webpack报错 DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead

报错信息:

Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
    at Chunk.get (D:\DM\Vuejs\base\node_modules\webpack\lib\Chunk.js:849:9)
    at D:\DM\Vuejs\base\node_modules\extract-text-webpack-plugin\dist\index.js:176:48
    at Array.forEach ()
    at D:\DM\Vuejs\base\node_modules\extract-text-webpack-plugin\dist\index.js:171:18
    at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\DM\Vuejs\base\node_modules\tapable\lib\HookCodeFactory.js:32:10), :7:1)
    at AsyncSeriesHook.lazyCompileHook (D:\DM\Vuejs\base\node_modules\tapable\lib\Hook.js:154:20)
    at Compilation.seal (D:\DM\Vuejs\base\node_modules\webpack\lib\Compilation.js:1244:27)
    at hooks.make.callAsync.err (D:\DM\Vuejs\base\node_modules\webpack\lib\Compiler.js:624:17)
    at _err0 (eval at create (D:\DM\Vuejs\base\node_modules\tapable\lib\HookCodeFactory.js:32:10), :11:1)
    at _addModuleChain (D:\DM\Vuejs\base\node_modules\webpack\lib\Compilation.js:1095:12)

原因:

extract-text-webpack-plugin 版本不对

解决方案:

下载最新的extrack-text-webpack-plugin

npm install extract-text-webpack-plugin@next --save-dev

 

你可能感兴趣的:(webpack报错 DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead)