compiler.plugin is not a function
See original GitHub issueI’m following the Browsersync - Webpack + React Hot Loader / React Transform HMR recipes trying to add hot-loader into my Gulp build system, but, I’m seeing the following error and I’m not sure to understand how this works in order to determine if this is an issue.
[19:41:07] TypeError: compiler.plugin is not a function
at module.exports (Z:\development\reactjs\node_modules\webpack-dev-middleware\middleware.js:35:11)
at Gulp.<anonymous> (Z:\development\reactjs\gulpfile.js:271:17)
at module.exports (Z:\development\reactjs\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (Z:\development\reactjs\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (Z:\development\reactjs\node_modules\orchestrator\index.js:214:10)
at Gulp.Orchestrator.start (Z:\development\reactjs\node_modules\orchestrator\index.js:134:8)
at C:\Users\geedmo\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:20
at doNTCallback0 (node.js:419:9)
at process._tickCallback (node.js:348:13)
at Function.Module.runMain (module.js:469:11)
Any thoughts?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
compiler.plugin is not a function at ReactLoadablePlugin ...
The issue is likely that you try to use a Webpack 4 plugin with Webpack 5, just Webpack has uninformative error ...
Read more >v5: [webpack-cli] TypeError: compiler.plugin is not a function
Bug report. What is the current behavior? Made all suggestions for v4->v5 try to run dev configuration with webpack serve and got the...
Read more >[Solved]-TypeError: compiler.plugin is not a function at ...
The issue is likely that you try to use a Webpack 4 plugin with Webpack 5, just Webpack has uninformative error messages. Try...
Read more >Calcite Components with Webpack 5 - Esri Community
I am trying to incorporate Calcite Components into a Webpack 5 app. After following the steps outlined in the readme and then serving...
Read more >Plugins - webpack
A webpack plugin is a JavaScript object that has an apply method. This apply method is called by the webpack compiler, giving access...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My fault, was using webpack-stream
I get the same error, because I use webpack.config.js directly, like this:
the right code is (you need to require webpack first)
http://webpack.github.io/docs/webpack-dev-server.html#api