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(react): DefinePlugin Conflicting when run serve with production built #9448

Closed
wants to merge 2 commits into from

Conversation

kamontat
Copy link

Current Behavior

When we run production built with create-nx-workspace react it always warning about conflict NODE_ENV

WARNING in DefinePlugin
Conflicting values for 'process.env.NODE_ENV'

and output always be development mode even we add production configuration

Expected Behavior

you should able to run yarn nx serve client --configuration production whenout warning and the output should be production mode.

Related Issue(s)

Fixes #7924

@nx-cloud
Copy link

nx-cloud bot commented Mar 22, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit 73b7da2. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 7 targets

Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented Mar 22, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/EjXWfP9sDDBfoKyoSkcjKPRKYg1u
✅ Preview: Canceled

[Deployment for 73b7da2 canceled]

@jaysoo
Copy link
Member

jaysoo commented Apr 2, 2022

Closing this one due to a fix here #9656

In Nx 14, we'll also add a new development configuration like we do for production which would further fix some edge cases around this, like you cannot run nx build for non-production configuration unless you manually add the configuration yourself.

@jaysoo jaysoo closed this Apr 2, 2022
@kamontat kamontat deleted the patch-2 branch April 13, 2022 16:01
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WARNING in DefinePlugin Conflicting values for 'process.env.NODE_ENV'
2 participants