-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Conversation
Adds support for
```
export * from 'module';
export { function } from 'module'
```
providedExports field appears to be around for all of Webpack 4. If prior webpacks are supported still, then will need a simple adapter layer.
Deevian
commented
Oct 14, 2020
Any possibility of moving this forward?
Closed
throw new Error('Attempted to load a worker implemented in CommonJS');
}
let exports = entries[0].entryModule.buildMeta.providedExports;
Contributor
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.
Note that as per webpack/webpack#8576 (landed on Webpack 5.0), buildMeta.providedExports is no longer there
To retrieve the provided exports like in webpack 4, we would need to call compilation.moduleGraph.getProvidedExports, i.e. let providedExports = compilation.moduleGraph.getProvidedExports(entries[0].entryModule);
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expands on/supersedes #100. Removing the parser logic simplifies the webpack API integration and number of points that break as a result of webpack 5 changes.
Note that karma-webpack would not play nicely when I installed webpack 5, so while this appears to compile correctly, it has not been tested at runtime with Webpack 5.
Possible fix for #77