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

webpack-dev-server 2.8.1 triggers a bug in webpack-split-by-path #33

Open
hpatelx opened this issue Sep 21, 2017 · 0 comments
Open

webpack-dev-server 2.8.1 triggers a bug in webpack-split-by-path #33

hpatelx opened this issue Sep 21, 2017 · 0 comments

Comments

@hpatelx
Copy link

hpatelx commented Sep 21, 2017

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.

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

No branches or pull requests

1 participant