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): pass correct configuration when reading build target options in dev-server executor #9656

Merged

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Apr 1, 2022

This PR fixes and issue where there are conflicting NODE_ENV variables being used in DefinePlugin. There was a regression when we fixed #8932.

The problem was that when reading build target, we did not pass the current configuration in, so it defaulted to production as specified in nx.json (defaultConfiguration). This caused webpack to add its own DefinePlugin that conflicted with our own.

Closes #7924

@nx-cloud
Copy link

nx-cloud bot commented Apr 1, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit b600871. As they complete they will appear below. 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 Apr 1, 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/DEwe9LDayQpE7g6B1sdjcas19ea5
✅ Preview: Canceled

[Deployment for b600871 canceled]

@jaysoo jaysoo requested a review from FrozenPandaz April 1, 2022 17:28
@jaysoo jaysoo force-pushed the fix/react-build-target-for-dev-server branch from 077028c to b681fff Compare April 1, 2022 17:43
@jaysoo jaysoo force-pushed the fix/react-build-target-for-dev-server branch from b681fff to 12c0e26 Compare April 1, 2022 17:49
@jaysoo jaysoo force-pushed the fix/react-build-target-for-dev-server branch from 12c0e26 to 176a8dd Compare April 1, 2022 17:57
@jaysoo jaysoo force-pushed the fix/react-build-target-for-dev-server branch from 176a8dd to 8a74fc4 Compare April 1, 2022 20:24
@jaysoo jaysoo changed the title fix(react): pass configuration from context when reading build target options fix(react): pass correct configuration when reading build target options in dev-server executor Apr 1, 2022
@jaysoo jaysoo force-pushed the fix/react-build-target-for-dev-server branch from 8a74fc4 to b600871 Compare April 1, 2022 21:20
@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