Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix environment variables on Windows #269

Open
lejonmanen opened this issue Sep 8, 2020 · 1 comment
Open

Fix environment variables on Windows #269

lejonmanen opened this issue Sep 8, 2020 · 1 comment

Comments

@lejonmanen
Copy link

Summary: when you have installed and run the dev script in a Windows environment, you get an error message. This is because Windows terminals does not accept NODE_ENV="development". The package cross-env can be used to solve this.

Suggested fix:
Add cross-env to the generated package.json file and modify the scripts.
"scripts": { "dev": "cross-env NODE_ENV=\"development\" webpack-dev-server --config webpack.config.js", "build": "cross-env NODE_ENV=\"production\" webpack --config webpack.config.js" }, "devDependencies": { "cross-env": "latest", ... }

@kbrsh
Copy link
Owner

kbrsh commented Sep 25, 2020

Good catch! This functionality was lost somewhere in a rewrite. This change would go in moon-template. If someone wants to make a PR there, feel free (this is a good first issue I think)! I'll get that fixed with the next release. 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants