-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v4] vite build --watch only compile html classes right on the init run #14106
Comments
try adding purge: ["./src/**/*.{html,js}"], in the tailwind config file |
@Massa-Albani4 Its the vite Plugin from v4 no tailwindcss config anymore |
@KartoffelToby Heya! Do you have a repro that you can share? We've been looking into the Vite plugin just last week and as a result of that also added a new integration test that does cover changing a |
1. Check Vite Configuration: import { defineConfig } from "vite"
import path from "path"
export default defineConfig({
build: {
rollupOptions: {
input: {
main: path.resolve(__dirname, "index.html"),
// Add other HTML entry points here
}
}
}
}) / module.exports = {
content: [
"/index.html",
"./src/**/*.{js,ts,jsx,tsx,html}",
],
theme: {
extend: {},
},
plugins: [],
} / 3. Update Dependencies: |
What version of Tailwind CSS are you using?
v4
What build tool (or framework if it abstracts the build tool) are you using?
Plain vite Projekt with css/html Input files in rollup config
What version of Node.js are you using?
v20.11.0
What browser are you using?
Chrome
What operating system are you using?
Linux Debian
Describe your issue
I have some css files ans HTML files. The HTML contains some tailwindcss classes like p-2 etc. If i run vite build --watch the first build is correct. And the p-2 css Definition is in the Output css. But if i change the classes in the HTML it recompiles but dont get the new classes. If i use @apply in my source css file the Compiler works every time. So must be a bug in the HTML stuff.
The text was updated successfully, but these errors were encountered: