TailwindCSS in browser not updated after modifying class
<p>I'm using React to run Tailwind, but in order to see the changes I made to classNames, I have to restart the server and run <code>npm run start</code> again to see the updates.
Is there anything I need to change in my script so that the browser updates without needing to restart the server. </p>
<h5>package.json</h5>
<pre class="brush:json;toolbar:false;">"scripts": {
"start": "npm run build:css && react-scripts start",
"build": "npm run build:css && react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"build:css": "postcss src/CSS/tailwind.scss -o src/CSS/index.scss "
}
</pre>
<h5>tailwind.config.js</h5>
<pre class="brush:js;toolbar:false;">/**@type {import('tailwindcss').Config}*/
module.exports = {
content: [
'./app/**/*.{js,ts,jsx,tsx}',
'./pages/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
'./src/**/*'
],
theme: {
extend: {},
},
plugins: [],
};
</pre>
<h5>postcss.config.js</h5>
<pre class="brush:js;toolbar:false;">module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
</pre>
<p>I tried using <code>npm-run-all</code> without success. Any other suggestions? </p>