(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 执行这个试试
升级到4.0.0-beta.0后还是会报DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead,是什么原因呢
https://www.npmjs.com/package/mini-css-extract-plugin
webpack4 使用mini-css-extrace-plugin
Webpack4 以后对 css 模块支持的逐步完善,建议使用 mini-css-extract-plugin 插件代替 extract-text-webpack-plugin 插件
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); module.exports = { plugins: [ new MiniCssExtractPlugin({ filename: "[name].css", chunkFilename: "[id].css" }) ], module: { rules: [ { test: /.css$/, use: [ MiniCssExtractPlugin.loader, "css-loader" ] } ] }}
没有解决问题
如果尝试了很多办法还是不行的,建议将以下包降为以下版本
"extract-text-webpack-plugin": "^3.0.2", "webpack": "^3.10.0", "webpack-dev-server": "^2.9.7"
"extract-text-webpack-plugin": "^4.0.0-beta.0",
升到这个版本就可以了
我也遇到了同样的问题,加@next执行后可以编译了,但是提取不到css文件,请问 这也是版本的问题吗,有解决的办法吗