Webpack version 4.0 extract-text-webpack-plugin cannot be used, what are the alternatives?

recently you need to use webpack to build a new project, but the current version of webpack (webpack 4.0) does not support the extract-text-webpack-plugin plug-in and always reports errors at run time.

clipboard.png

looked it up, and the answer I got on github was that the author did not update this plug-in to support webpack 4.0so there was an error. Is there any solution?

Mar.13,2021

yarn add extract-text-webpack-plugin@next can solve


npm install-D extract-text-webpack-plugin@next

https://github.com/webpack-co.


have friends found a solution yet.


after searching the Internet, I finally found the answer on github, saying that extract-text-webpack-plugin can not run in webpack 4.0 + version temporarily, so it can only reduce the webpack in the project to 3.0 +

.
Menu