Skip to content

Commit

Permalink
Merge pull request #233 from bjoaquinc/react-build-bug-fix
Browse files Browse the repository at this point in the history
Fix npm run watchreact initial build bug
  • Loading branch information
andrewpareles authored Jan 29, 2025
2 parents 327dbb9 + fb0bb0c commit c1123f2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/vs/workbench/contrib/void/browser/react/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ const args = process.argv.slice(2);
const isWatch = args.includes('--watch') || args.includes('-w');

if (isWatch) {
// this just builds it if it doesn't exist instead of waiting for the watcher to trigger
// Check if src2/ exists; if not, do an initial scope-tailwind build
if (!fs.existsSync('src2')) {
try {
console.log('🔨 Running initial scope-tailwind build to create src2 folder...');
execSync(
'npx scope-tailwind ./src -o src2/ -s void-scope -c styles.css -p "void-"',
{ stdio: 'inherit' }
);
console.log('✅ src2/ created successfully.');
} catch (err) {
console.error('❌ Error running initial scope-tailwind build:', err);
process.exit(1);
}
}

// Watch mode
const scopeTailwindWatcher = spawn('npx', [
'nodemon',
Expand Down

0 comments on commit c1123f2

Please sign in to comment.