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 4.16.5 #27

Open
branfordwang opened this issue Apr 30, 2019 · 1 comment
Open

Webpack 4.16.5 #27

branfordwang opened this issue Apr 30, 2019 · 1 comment

Comments

@branfordwang
Copy link

This is currently failing at compiler.parser.plugin because compiler.parser is undefined

compiler.parser.plugin("var rewire", function () {
return true;
});

Browser console error:

TypeError: Cannot read property 'plugin' of undefined
at RewirePlugin.apply (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/rewire-webpack/lib/RewirePlugin.js:22:21)
at webpack (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/webpack/lib/webpack.js:47:13)
at Plugin (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/karma-webpack/lib/karma-webpack.js:87:16)
at invoke (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/di/lib/injector.js:75:15)
at Array.instantiate (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/di/lib/injector.js:59:20)
at get (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/di/lib/injector.js:48:43)
at /Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/di/lib/injector.js:71:14
at Array.map ()
at Array.invoke (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/di/lib/injector.js:70:31)
at Injector.get (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/di/lib/injector.js:48:43)
at instantiatePreprocessor (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/karma/lib/preprocessor.js:55:20)
at Array.forEach ()
at createPreprocessor (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/karma/lib/preprocessor.js:74:20)
at Array.invoke (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/di/lib/injector.js:75:15)
at get (/Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/di/lib/injector.js:48:43)
at /Users/bwang/Documents/workspace/ResponsiveBooking/node_modules/di/lib/injector.js:71:14

@rensbaardman
Copy link

rensbaardman commented Jun 12, 2019

Unfortunately, the plugin doesn't have webpack 4 support. Webpack 4 introduced a different plugin API, which you are seeing the errors of.

A solution is to use my fork which supports webpack 4.

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

2 participants