Process only given entrypoints in webpack
Hello,
Im using purgecss (in webpack, via postcss-loader) in a big project that has 3 different layouts: old, transition and new.
Old and transition i would like to keep intact, and new one is using tailwindcss, so obviously i would like to put it through purgecss.
I know i can do two webpack configs, but is it possible to do it natively with postcss-purgecss, or are there any plans in introducing such a feature?
Note: Temporairly ill try to use ignore comments in all the files i want to exclude, but i must say, it would be more convenient to filter them out on a config level. :)
I used ignore comments and they work great, but having said that, i cannot put them into dynamically created async chunks, so dependencies pulled straight from node_modules are getting obliterated.
Example:
app.js
import("./markdown_editor"); // creates dynamic chunk in webpack
markdown_editor.js
import "simplemde/dist/simplemde.min.css";
This will spit out dynamic chunk css/vendors~markdown_editor.1dc.css which gets purged and completely useless.
Now i have two paths again:
- create separate webpack config, as before... and im closer and closer to do that.
- start whitelisting classes used by those dependencies and pray to everyone (including me) to never forget that
I hope this gives more view into how this feature would help people :)