Why do I have to re-serve my project every time I add a new tailwind class to my angular project?

Viewed 170

I have added Tailwind to an Angular 11.2.6 project.

Every time I add a new tailwind class to my html, I have to reserve the project or it won't be applied.

I'm also using Angular Material in my project.

EDIT: THIS IS MY SERVE COMMAND: npm run hash:i18n && ng serve --port 4004

This is my tailwind.config.js:

module.exports = {
  purge: {
    enabled: true,
    content: ['./src/**/*.{html,ts}', './projects/**/*.{html,ts}'],
  },
  darkMode: false, // or 'media' or 'class'
  theme: {
    extend: {},
  },
  variants: {},
  plugins: [],

  corePlugins: {
    preflight: false,
  },
};

Also, you might wonder why purge is always set to true. At first, I set it true only in production builds, but by doing so, my project failed to run. Angular CLI would give me an error stating that the stack size is too large.

0 Answers
Related