0

Using tailwind purge option to remove unused css, but all styles are getting removed.

Reference: https://v2.tailwindcss.com/docs/optimizing-for-production#basic-usage

My tailwind.config.js file looks like below

module.exports = {
  purge: ['./src/page/**/*.js', './src/layouts/**/*.js', './components/**/*.js'],
  darkMode: false,
  theme: {}
}
  • why all three options in purge are same? If they all are same , write it once . –  Jul 21 '22 at 04:57
  • The above purge config worked fine, earlier i was giving wrong path for pages like './src/page/**/*.js'. Now working fine with purge: ['./src/pages/**/*.js', './src/layouts/**/*.js', './components/**/*.js'], –  Jul 21 '22 at 05:16
  • @user12417761 I have given wrong path earlier , now correct path it worked fine. –  Jul 21 '22 at 12:46

0 Answers0