Skip to content

Commit 9723898

Browse files
committed
fix(init): prevent css from being added to config more than once
1 parent 1115fc5 commit 9723898

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/commands/init.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ const runInitCommand = async (options: InitOptions) => {
7373
}
7474
// Add css path to config
7575
config.css ||= [];
76-
config.css.push(`~/${uiConfig.tailwindCSSLocation?.split("app/")[1]}`);
76+
const cssPath = uiConfig.tailwindCSSLocation?.split("app/")[1];
77+
if (!cssPath) {
78+
config.css.push(`~/${cssPath}`);
79+
}
7780
},
7881
});
7982
await addTailwindVitePlugin();

0 commit comments

Comments
 (0)