Skip to content

Simplify namespace interop - #2136

Merged
lukastaegert merged 1 commit into
masterfrom
namespace-interop-simplify
Apr 18, 2018
Merged

Simplify namespace interop#2136
lukastaegert merged 1 commit into
masterfrom
namespace-interop-simplify

Conversation

@guybedford

@guybedford guybedford commented Apr 18, 2018

Copy link
Copy Markdown
Contributor

This fixes #2081 allowing external modules imported as both default and namespaces can still have default interop applied to them in the default import case (matching the AMD, IIFE and UMD interop cases to CommonJS in the process).

This replaces #2080, while including a lot of simplification in the interop handling code.

@lukastaegert lukastaegert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvement, also makes the code so much nicer!

@lukastaegert lukastaegert added this to the 0.59.0 milestone Apr 18, 2018
@lukastaegert
lukastaegert merged commit 79ad616 into master Apr 18, 2018
@lukastaegert
lukastaegert deleted the namespace-interop-simplify branch April 18, 2018 19:30
@TrySound

TrySound commented Apr 18, 2018

Copy link
Copy Markdown
Member

Great! This fixes an issue with different ways to import react

import React from 'react';
import * as React from 'react';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default imports interop block is not generated for external modules

3 participants