webpack: Error: Chunk.entry was removed. Use hasRuntime()
Just upgraded from 2.1.0-beta.15 to 2.1.0-beta.17. When I run my build using
webpack -p --env prod
I am getting the following error
Error: Chunk.entry was removed. Use hasRuntime()
Any ideas what is going on?
I have a demo this afternoon and need to get this working. Can’t go back to beta.15 because I was starting to see a different error there. Thanks in advance for your help.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 74
- Comments: 26 (6 by maintainers)
Commits related to this issue
- fix(build): prevent build throw see https://github.com/webpack/webpack/issues/2764 — committed to SIGSEV/minus by meriadec 8 years ago
- upgrade extract-text-web-plugin to resolve this bug: https://github.com/webpack/webpack/issues/2764 — committed to huangc28/universal by deleted user 8 years ago
install extract-text-webpack-plugin@^2.0.0-beta
@galensheen What helped me was installing
extract-text-webpack-plugin@^2.0.0-beta
as @sokra has suggested earlier:Here is my current very simple webpack config, which seems to work:
@developer94404 as others in this thread have pointed out, you need to install a webpack2.0-compatible version of the plugin.
In case somebody will try to find solution - extract-text-webpack-plugin@^2.0.0-beta did not work for me, but executing npm install --save-dev extract-text-webpack-plugin@^2.0.0-rc.3 works
Updating the Extract Text Plugin to 2.0.0-beta worked for the most part, however another problem has appeared, extracting CSS build with SASS plugin stopped working: https://github.com/webpack/extract-text-webpack-plugin/issues/211 It works correctly when not using ExtractTextPlugin, so it must be either a Webpack or Extract Text Plugin problem.
That’s something else. As workaround remove the DedupePlugin
@JonatanSalas: Would that be possible to share the versions of webpack and extract-text-plugin that work to build your MERN 2 project? Thanks a lot!
He means
webpack-extract-text-plugin
’s2.0.0-beta
, notwebpack
’shttps://github.com/webpack/extract-text-webpack-plugin/commit/d301fd0c350356cb8652e12a9b9de7c72924fa3c
rc3 worked for me as well, however, running
npm i extract-text-webpack-plugin@^2.0.0-beta
added rc3 to my package.json file@niieani, just got SASS working with this combo. I’m not chunking yet and hot updates not working but .scss are packed in .css in my distribution directory. Also using a global .scss with component level .scss. All combined into the [name].[id].style.css.
webpack.config.js:
package.json:
Yep, just saw that (https://github.com/webpack/webpack/issues/2644). Problem solved. Thank you all for helping out. Keep up the great work!