New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switches CommonJS modules to use the module metadata map #3417
Conversation
The metadata provides the module type of the imported module. Also adds module interop integration tests. Fixes google#3360
LINE_JOINER.join( | ||
"var $jscomp$destructuring$var0 = module$i0.default;", | ||
"var foo$$module$i1 = $jscomp$destructuring$var0.foo;", | ||
"var b$$module$i1 = module$i0.bar();", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a typo? Shouldn't it be module$i0.default.bar
?
@@ -262,11 +261,127 @@ public void testCrossModuleSubclass6() { | |||
}); | |||
} | |||
|
|||
@Test | |||
public void testCommonJSImportsESModule() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also fwiw I'm pretty sure I had nothing to do with this one since I didn't touch the CJS pass :)
I'll take a look at the others, but can you handle this one?
Internal issue created http://b/135037612 |
Please sync after ec31e72. I've fixed ES modules importing CJS modules. |
Hi Chad, are you still interested in merging this PR? |
I'll pick this up again some day, but I will start a new PR. This is too stale. |
The metadata provides the module type of the imported module. Also adds module interop integration tests.
I added 2 failing tests that need fixed. Both seem to indicate a problem with ES Module rewriting and default properties.
Fixes #3360