webpack 使用 extract-text-webpack-plugin 报错 Tapable.plugin is deprecated. Use new API on .hooks instead

webpack 使用 extract-text-webpack-plugin 报错 Tapable.plugin is deprecated. Use new API on .hooks instead

After using the const ExtractPlugin = require('extract-text-webpack-plugin')configuration , it appears when cnpm run build Tapable.plugin is deprecated. Use new API on `.hooks` instead,

The reason webpack was upgraded to v4.xx, and the tutorial did not have v4.xx at that time, it was v3.xx at that time.

Reinstall the specified version of webpack and cnpm i [email protected]downgrade it, and then run ```` cnpm run build ```` and it works fine.

Reference 1 1

Reference 2 2

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325068322&siteId=291194637