-
Notifications
You must be signed in to change notification settings - Fork 10
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
Differents services or inner polyfill-service #4
Comments
I'm currently working on the next release of this plugin. It will be possible to create one asset for each combination of needed polyfills. For example, if you configure that polyfills A, B and C are required, then webpack bundles assets for A, B, C, AB, AC, BC, ABC and the entry chunk will load the required one. The server does not need to do anything special because it just serves a static file that is contained in the bundle. Would that fit your needs, or do you need to rely on a polyfill-service that dynamically serves the files instead of generating every possible option at build time? (There will still be the option to bundle only a single file contrasting all polyfills) |
The new version
Does that fit the needs requested here? |
entry: {
entry1: `webpack-polyfill-injector?${JSON.stringify({
modules: ['./src/entry1.js'],
polyfills: ['Promise', 'Array.prototype.find'],
})}!`,
entry2: `webpack-polyfill-injector?${JSON.stringify({
modules: ['./some-vendor-script-that-will-be-loaded-first.js', './src/entry2.js'],
polyfills: ['String.prototype.startsWith'],
})}!`,
}, If you have other requirements that are not possible with the new update then please open a new issue explaining the use-case. Thanks! |
Any way to get some polyfills in one service and the other with the polyfill-service delivered in the package ?
something like this perhaps ?
The text was updated successfully, but these errors were encountered: