TailwindCss : purge not working with Symfony and Webpack Encore #3538
-
The Problem :(Sorry for my broken english, I'm french) Whatever the values I put into the "purge" parameter in my "tailwind.config.js", the final CSS always have the same size (3Mib !!). Link to a minimal reproduction:Here is my package.json (NPM) : I import tailwindcss css files into my app css files, using : I configured my postCSS loader with this postcss.config.js : (I know that I could write "require('tailwindcss')", but I tried this other method for being sure my tailwind.config.js file is read...) In my tailwind.config.js, I have : When I use "npm run dev", my final app.css is about 4,99 Mib. When I use "npm run build", my final app.css is 3Mib. If I delete the filter in the purge parameter, the final app.css is always 3 Mib. I'm quite lost. If purge doesn't work, I will not be able to use Tailwind because 3Mib is too much... If you have any idea to help me, I will be very graceful. Regards, -- |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Does Symfony set NODE_ENV to production when doing a build? If not PurgeCSS won't run. |
Beta Was this translation helpful? Give feedback.
Does Symfony set NODE_ENV to production when doing a build? If not PurgeCSS won't run.