Description
The build scripts createApp.mjs, createAppMinimal.mjs, and the Webpack configuration files (webpack.config.main.mjs) use spawnSync('node', ...) or direct string commands assuming node is available. This can cause issues on Windows environments where node.exe is often required. To ensure cross-platform compatibility, we should use a platform-aware command for the Node.js binary.
Goal
Update buildScripts/createApp.mjs, buildScripts/createAppMinimal.mjs, and relevant Webpack configuration files to dynamically determine the Node.js command (node or node.exe) based on the operating system.
Acceptance Criteria
- Define
nodeCmd in buildScripts/createApp.mjs and buildScripts/createAppMinimal.mjs to handle Windows (node.exe) vs. other platforms (node).
- Replace
spawnSync('node', ...) calls with spawnSync(nodeCmd, ...) in these files.
- Update
buildScripts/webpack/production/webpack.config.main.mjs and buildScripts/webpack/development/webpack.config.main.mjs to use nodeCmd in WebpackHookPlugin commands.
Description
The build scripts
createApp.mjs,createAppMinimal.mjs, and the Webpack configuration files (webpack.config.main.mjs) usespawnSync('node', ...)or direct string commands assumingnodeis available. This can cause issues on Windows environments wherenode.exeis often required. To ensure cross-platform compatibility, we should use a platform-aware command for the Node.js binary.Goal
Update
buildScripts/createApp.mjs,buildScripts/createAppMinimal.mjs, and relevant Webpack configuration files to dynamically determine the Node.js command (nodeornode.exe) based on the operating system.Acceptance Criteria
nodeCmdinbuildScripts/createApp.mjsandbuildScripts/createAppMinimal.mjsto handle Windows (node.exe) vs. other platforms (node).spawnSync('node', ...)calls withspawnSync(nodeCmd, ...)in these files.buildScripts/webpack/production/webpack.config.main.mjsandbuildScripts/webpack/development/webpack.config.main.mjsto usenodeCmdinWebpackHookPlugincommands.