使用webpack4.0时遇到错误Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead

在使用webpack4.0以上打包工具时,会遇到一个问题,那就是安装3.x extract-webpack-plugin 插件时,

会遇到不支持的问题,并且会抛出错误信息 Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead

解决方法如下:

1.直接在控制台输入:npm install --save-dev extract-text-webpack-plugin@next

2.如果1无效,请尝试直接输入:npm install --save-dev extract-text-webpack-plugin@4.0.0-beta.0

在你的webpack.config.js中检查是否成功添加:

之后再次运行webpack-plugin插件就不会报错啦。

 

posted @ 2018-12-05 10:55  Q刀鱼  阅读(921)  评论(0编辑  收藏  举报