tailwind
tailwind copied to clipboard
Css file size why large?
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[√] Bug report
[√] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:
Current behavior
After the project is built, the css output size appears to be 7.5Mb, so I don't think purge for Tailwind is working correctly.
here is my tailwind config:
module.exports = {
prefix: '',
purge: {
content: ['./src/**/*.{html,ts}'],
},
darkMode: 'class', // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [
require('@tailwindcss/aspect-ratio'),
require('@tailwindcss/forms'),
require('@tailwindcss/line-clamp'),
require('@tailwindcss/typography'),
],
};
And output:
Expected behavior
Minimal reproduction of the problem with instructions
For bug reports please provide the STEPS TO REPRODUCE and if possible a MINIMAL DEMO of the problem
What is the motivation / use case for changing the behavior?
Environment
Angular version: 11.2.7
Browser:
- [√] Chrome (desktop) version 89
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [√] Firefox version 88
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: 15.2.1
- Platform: darwin x64
Others:
try ng build --prod
Yes I didn't use the --prod
flag, you are right @vltansky ! The problem's been solved.
Same here +1
@webben-de did prod flag solve it for you ?
no this not! But i just figured out that prepend NODE_ENV=production
to my build command solves it....
so for my case "build": "NODE_ENV=production ng build --prod --stats-json",
Same here +1