Skip to content

Commit b3a646c

Browse files
committed
fix (webpack): don't include wp-polyfill dependencies automatically
Follow up to #278, remove option `injectPolyfill` in webpack plugin dependency-extraction-webpack-plugin. The `wp-polyfill` script won't be added as a dependency to all entries anymore. This will reduce the number of scripts loaded on the page and save on resources. Scripts will need to explicitely declare the dependencies if they want to include it. The dependency will also be included if one of the script dependency requires it.
1 parent 1d8f32c commit b3a646c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/plugins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = {
3131
new WebpackBar({
3232
color: '#ffe600',
3333
}),
34-
new DependencyExtractionWebpackPlugin({ injectPolyfill: true }),
34+
new DependencyExtractionWebpackPlugin(),
3535
]
3636

3737
if (mode === 'production') {

0 commit comments

Comments
 (0)