WebPack
您现在的位置是:博客主页 > Web教程 > WebPack

webpack4.* Tapable.plugin is deprecated. Use new API on `.hooks` instead

By 点想博主 on WebPack Time 2019-05-09 from:互联网 539人已围观
简介:    webpack4.* 编译打包问题描述 在使用extract-text-webpack-plugin给webpack打包时出现报错 Tapable.plugin is deprecated. Use new API on `.hooks` instead extract-text-webpack-plugin下载安装

webpack4.* 编译打包问题描述

在使用extract-text-webpack-plugin给webpack打包时出现报错

Tapable.plugin is deprecated. Use new API on `.hooks` instead

extract-text-webpack-plugin下载安装

Administrator@PC-20190222QKVD MINGW64 ~/Desktop/webpack-demo
$ cnpm i extract-text-webpack-plugin -D
√ Installed 1 packages
√ Linked 0 latest versions
√ Run 0 scripts
√ All packages installed (used 321ms(network 317ms), speed 16.25kB/s, json 1(5.15kB), tarball 0B) 

找到问题原因

extract-text-webpack-plugin目前版本不支持webpack4。

找到解决方案

使用extract-text-webpack-plugin的最新的beta版
npm install extract-text-webpack-plugin@next -D
$ cnpm install extract-text-webpack-plugin@next -D
√ Installed 1 packages
√ Linked 0 latest versions
√ Run 0 scripts
√ All packages installed (used 299ms(network 297ms), speed 17.34kB/s, json 1(5.15kB), tarball 0B) 
相关文章
文章评论

( 0 )