When creating a new app using npx create-mf-app on a Windows machine, the default package.json scripts do not work as expected due to not having cross-env.
Windows users will encounter issues when trying to run the default scripts because Windows does not recognize NODE_ENV=... syntax without cross-env.
Current default scripts:
"scripts": {
"build": "NODE_ENV=production rspack build",
"build:dev": "NODE_ENV=development rspack build",
"build:start": "cd dist && rspack serve",
"start": "NODE_ENV=development rspack serve"
}
Suggested update for cross-platform support:
"scripts": {
"build": "cross-env NODE_ENV=production rspack build",
"build:dev": "cross-env NODE_ENV=development rspack build",
"build:start": "cd dist && rspack serve",
"start": "cross-env NODE_ENV=development rspack serve"
}
Action:
Please consider either:
- Updating the generated scripts to include
cross-env by default, or
- Mentioning in the documentation that Windows users should install
cross-env (npm install cross-env) and update the scripts manually for compatibility.
This small change would help avoid confusion and improve out-of-the-box experience for Windows developers.
When creating a new app using
npx create-mf-appon a Windows machine, the defaultpackage.jsonscripts do not work as expected due to not havingcross-env.Windows users will encounter issues when trying to run the default scripts because Windows does not recognize
NODE_ENV=...syntax withoutcross-env.Current default scripts:
Suggested update for cross-platform support:
Action:
Please consider either:
cross-envby default, orcross-env(npm install cross-env) and update the scripts manually for compatibility.This small change would help avoid confusion and improve out-of-the-box experience for Windows developers.