Then, I want to use PurgeCSS, and I follow this guide, but when I run yarn add --dev purgecss-webpack-plugin , I have this error and I’m stuck with it…:
error An unexpected error occurred: “could not find a copy of webpack to link in /path_to_my_project/node_modules/purgecss-webpack-plugin/node_modules”.
I tried several fixes, bu nothing works… Can someone help me installing purgecss ?
Thanks a lot !!
I solved my installation. issue : I changed my webpack version inside my package.json from "webpack": "~3.10.0" to "webpack": "^3.0.0"
It seems that the version 3.12 fixed this issue…
But I have another issue : the yarn build:production command is not working anymore : I’ve got this error TypeError: Cannot read property 'compilation' of undefined