Skip to content

Commit 379fd89

Browse files
committed
Enhance start.bat with improved Node.js v23 compatibility and build process
- Add memory allocation increase (--max-old-space-size=4096) - Add theme building step using lessc before starting the app - Change from yarn start to yarn run craco start - Add error handling with proper exit codes - Improve script structure with goto statements for better flow control
1 parent 74d53bc commit 379fd89

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

start.bat

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
@echo off
22
REM This script sets the necessary environment variable and starts the React app
33

4-
echo Setting OpenSSL legacy provider and starting the app...
5-
set NODE_OPTIONS=--openssl-legacy-provider
6-
yarn start
4+
echo Setting OpenSSL legacy provider and increasing memory allocation...
5+
set "NODE_OPTIONS=--openssl-legacy-provider --max-old-space-size=4096"
6+
7+
REM Run lessc directly using local node_modules
8+
call node_modules\.bin\lessc --js --clean-css="--s1 --advanced" src/styles/themes/main.less public/themes/main.css
9+
if errorlevel 1 goto error
10+
11+
echo Theme built successfully, starting the app...
12+
call yarn run craco start
13+
if errorlevel 1 goto error
14+
goto end
15+
16+
:error
17+
echo Failed with error #%errorlevel%.
18+
exit /b %errorlevel%
19+
20+
:end

0 commit comments

Comments
 (0)