*webpack4. 编译打包**
问题描述
在使用extract-text-webpack-plugin给webpack打包时出现报错
Tapable.plugin is deprecated. Use new API on .hooks
instead
下载安装
Administrator@PC-20190222QKVD MINGW64 ~/Desktop/webpack-demo\r\n$ 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) 找到问题原因
nextract-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)
发表评论 取消回复