Open mbarberot opened 2 years ago
Ok, the only difference between with / without PurgeCSS is that it removes 200 lines of Tailwind CSS reset styles. I would bet that most of them won't be removed when the project will grow and that more templates will be written. I think we could safely remove it when using Tailwind v3.
Numbers :
Built project successfully. Stored in "dist/".
File sizes:
- dist/assets/learning-app.61404c1f24c753c32b668908c9678d74.css: 4.52 kB (1.46 kB gzipped)
- dist/assets/learning-app.css: 9.63 kB (2.95 kB gzipped)
Built project successfully. Stored in "dist/".
File sizes:
- dist/assets/learning-app.5ac6212c8f144612085ec9e4f6b29a7d.css: 3.12 kB (851 B gzipped)
- dist/assets/learning-app.css: 7.63 kB (2.28 kB gzipped)
I followed the README and it almost worked out of the box (not talking about the typo mentionned in #26) : some styles were here, but some others were missing (typically :
text-red-500
) Looking at the logs (ran ayarn start
) I had these warnings :It looks like that Tailwind 3 has changed the way they build the final CSS : instead of tree-shaking their massive css with PurgeCSS, they now inspect our code to include only the classes we need. Following the link to their documentation, I added this to the
tailwind.config.js
:which is basically a copy/past of the paths from the PurgeCSS config in
ember-cli-build.js
With this, it seems perfect I wonder if PurgeCSS is needed anymore with Tailwind v3, I may test this and come back with another PR to document my findings.