You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.
What you did:
add the above code snippets in a react project and run it as an npm script on windows OS.
What happened:
React code runs with production version instead of debug version. Looks like cross-env isn't setting the debug variable.
There are no errors thrown though.
Reproduction repository:
Problem description: cross-env isn't setting custom process environment variables on windows OS.
Suggested solution:
The text was updated successfully, but these errors were encountered:
&& is used in shells to run multiple commands in sequence.
So cross-env DEBUG=true && webpack-dev-server would be read as run command cross-env DEBUG=true and after that run command webpack-dev-server. cross-env would not receive webpack-dev-server as an argument and wouldn't run it.
cross-env doesn't modify the current instance's variables, rather it spawns a new shell and runs the command in it.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
cross-env
version: ^5.2.1node
version: 10.15.1npm
version: 6.4.1Relevant code or config
package.json > "scripts"
webpack.config.js
What you did:
add the above code snippets in a react project and run it as an npm script on windows OS.
What happened:
React code runs with production version instead of debug version. Looks like
cross-env
isn't setting the debug variable.There are no errors thrown though.
Reproduction repository:
Problem description:
cross-env
isn't setting custom process environment variables on windows OS.Suggested solution:
The text was updated successfully, but these errors were encountered: