Skip to content

Commit f17de66

Browse files
committed
fix: build config missing initial build css
1 parent f0171ce commit f17de66

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

build.config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,19 @@ async function buildAssets(options: BuildOptions = {}) {
135135
if (options.watch) {
136136
console.log('👀 Starting watch mode...');
137137

138-
// Initial build
138+
// Initial builds
139139
try {
140+
// Build CSS once before starting watcher
141+
await buildCSS({ ...options, watch: false });
140142
await buildJS(options);
141-
console.log('✅ Initial JS build completed');
143+
console.log('✅ Initial build completed');
142144
} catch (error) {
143145
console.error('Initial build failed:', error);
144146
process.exit(1);
145147
}
146148

147149
// Start watchers (both return processes that stay alive)
148-
const cssProc = await buildCSS(options);
150+
const cssProc = await buildCSS({ ...options, watch: true });
149151
const jsProc = await watchJS(options);
150152

151153
console.log('✅ Watch mode started - files will rebuild on changes');

0 commit comments

Comments
 (0)