moon icon indicating copy to clipboard operation
moon copied to clipboard

Fix environment variables on Windows

Open lejonmanen opened this issue 4 years ago • 1 comments

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", ... }

lejonmanen avatar Sep 08 '20 20:09 lejonmanen

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. :raised_hands:

kbrsh avatar Sep 25 '20 05:09 kbrsh