nystudio107 / annotated-webpack-config

This is the companion github repo for the "An Annotated webpack 4 Config for Frontend Web Development" article.
https://nystudio107.com/blog/an-annotated-webpack-4-config-for-frontend-web-development
MIT License
436 stars 75 forks source link

Something wrong with purgeCSS (seems it doesn't support pcss) #10

Closed escapedoc closed 5 years ago

escapedoc commented 5 years ago

Ca not run the build from your example. What have I done:

  1. Cloned your repo
  2. npm install
  3. npm run build

Doesn't build anything: image

escapedoc commented 5 years ago

The solution was uninstalling purgecss-webpack-plugin and purgecss-whitelister. Then installing pretty same versions as in package.json. Then another issue arises: image

What could it be? THe version of critical-css-webpack-plugin in current's repo is the newest as I can see in package.lock.json file

khalwat commented 5 years ago

Yeah that's correct, even though there was a PR included to support adding .pcss I think the parsers that it uses can't parse PostCSS properly.

You can use the PurgeCSS Whitelister on pure CSS files, or just come up with another way to whitelist entire files if they are PostCSS