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

Explicit build control via environment variables #628

Merged
merged 2 commits into from Feb 22, 2023

Conversation

oo-bldrs
Copy link
Contributor

Originally, there was logic that would enable or disable different parts of the build depending on the value of the NODE_ENV environment variable.

However, using this variable is fraught with problems due to the nature of the tooling combination that interprets its values in different ways[1][2].

This PR introduces dedicated environment variables for controlling specific behavior when the build is being performed.

This goes along with the necessary configuration changes within Netlify to effect the build as desired.

1: https://seanconnolly.dev/dont-be-fooled-by-node-env
2: https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-environment

@netlify
Copy link

netlify bot commented Feb 22, 2023

Deploy Preview for bldrs-share ready!

Name Link
🔨 Latest commit dcdab77
🔍 Latest deploy log https://app.netlify.com/sites/bldrs-share/deploys/63f65ea27b7cc60008eb6d23
😎 Deploy Preview https://deploy-preview-628--bldrs-share.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@oo-bldrs
Copy link
Contributor Author

Sentry issue: SHARE-A

Copy link
Member

@pablo-mayrgundter pablo-mayrgundter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, very nice. I've switched minification off and forgot about it too many times. This will help remember the distinction

@oo-bldrs oo-bldrs merged commit 3825472 into bldrs-ai:main Feb 22, 2023
OlegMoshkovich pushed a commit to OlegMoshkovich/Share that referenced this pull request Mar 3, 2023
* Use exclusive environment variable to control availability of MSW

* Use exclusive environment variable to control minification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

None yet

2 participants