altafino / react-webpack-5-tailwind-2

React 17 Boilerplate with Webpack 6, Tailwind 2, using babel, SASS/PostCSS, HMR, dotenv and an optimized production build
MIT License
295 stars 68 forks source link

Problems using Tailwind JIT #9

Closed OmkarK45 closed 3 years ago

OmkarK45 commented 3 years ago

Hi there, thank you for this boilerplate. However, when I replace contents of postcss.config.js to this // postcss.config.js module.exports = { plugins: { '@tailwindcss/jit': {}, autoprefixer: {}, } }

I have to restart webserver in order to load new changes in styles. Please let me know what I'm doing wrong

OmkarK45 commented 3 years ago

Update on this: So I was suggested not to use scss extension for index style file. That being paired with NODE_ENV=development has fixed the issue for me. Closing this.

stefanwuthrich commented 3 years ago

@OmkarK45 sorry for the late answer and thank you for posting the workaround.