moon
moon copied to clipboard
Fix environment variables on Windows
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", ... }
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: