-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Running into this issue.
6% basic chunk optimization/home/project/node_modules/webpack-split-by-path/index.js:167
if (ignore[i].test(resourcePath)) {
^
TypeError: ignore[i].test is not a function
Webpack configuration:
const SplitByPathPlugin = require('webpack-split-by-path');
new SplitByPathPlugin([
{name: 'vendor', path: path.join(__dirname, 'node_modules')},
],
{ignore: [/style-loader/, /css-loader/, /less-loader/, /\.scss$/, /\.css$/]}
),
This issue is we have a polyfilled includes method on array. This breaks webpack
bundle generation since polyfill method is iterated in for loop.
for (var i in ignore) {
if (ignore[i].test(resourcePath)) {
return match;
}
}
This is caused by webpack-dev-server > 2.7.1.
Suggestion would be update for loop to iterate on own properties. I can submit pull req after some discussion to ensure I'm not the only one with this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels