Skip to content

Commit 94de92a

Browse files
committed
🤖 Configure Tailwind to exclude worker files
Explicitly exclude *.worker.ts files from Tailwind scanning and add worker rollupOptions to ensure proper module format.
1 parent 8009896 commit 94de92a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

vite.config.mts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ const basePlugins = [
3939
plugins: babelPlugins,
4040
},
4141
}),
42-
tailwindcss(),
42+
tailwindcss({
43+
// Explicitly configure to avoid interfering with worker builds
44+
scan: {
45+
include: ['src/**/*.{ts,tsx,js,jsx}'],
46+
exclude: ['**/*.worker.ts'],
47+
},
48+
}),
4349
];
4450

4551
export default defineConfig(({ mode }) => ({
@@ -78,7 +84,12 @@ export default defineConfig(({ mode }) => ({
7884
},
7985
worker: {
8086
format: "es",
81-
plugins: [topLevelAwait()],
87+
plugins: () => [topLevelAwait()],
88+
rollupOptions: {
89+
output: {
90+
format: "es",
91+
},
92+
},
8293
},
8394
server: {
8495
host: "127.0.0.1",

0 commit comments

Comments
 (0)