webpack与extract-text-webpack-plugin版本冲突问题解决

描述:在webpack4.0中使用“extract-text-webpack-plugin”之后,生产环境下报错,如何解决

 (node:4728) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
(node:4728) DeprecationWarning: Tapable.apply is deprecated. Call apply on the plugin directly instead
/Users/x-kxem/myWorkSpace/vue-ssr-tech/node_modules/webpack/lib/Chunk.js:460
throw new Error(
^

Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
    at Chunk.get (/Users/x-kxem/myWorkSpace/vue-ssr-tech/node_modules/webpack/lib/Chunk.js:460:9)
    at /Users/x-kxem/myWorkSpace/vue-ssr-tech/node_modules/extract-text-webpack-plugin/dist/index.js:176:47 

解决方法:输入命令npm install extract-text-webpack-plugin@next

具体原因: https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/701


你可能感兴趣的:(bug)