Skip to content
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

Support webpack 5 #101

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Support webpack 5 #101

wants to merge 3 commits into from

Conversation

kpdecker
Copy link

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

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
Copy link

Deevian commented Oct 14, 2020

Any possibility of moving this forward?

@transcranial transcranial mentioned this pull request Nov 4, 2020
throw new Error('Attempted to load a worker implemented in CommonJS');
}

let exports = entries[0].entryModule.buildMeta.providedExports;
Copy link
Contributor

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);

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.

None yet

3 participants