Update Webpack client variables - #1607
Draft
victorlin wants to merge 3 commits into
Draft
Conversation
Based on a warning in the DefinePlugin docs¹, previous usage of a "process.env" key has the potential to break any modules that might use the process.env object. Luckily (so far) there is no such conflict in this project, but good to future-proof. ¹ https://v4.webpack.js.org/plugins/define-plugin/#usage
The process.env scope is commonly used in Node.js projects to contain variables injected from an external context. For Webpack, the scope can be any arbitrary name. "webpackConfig" is more self-describing and avoids potential confusion for someone searching the codebase. Without this change, one might suspect that `process.env.PORT` referenced in cli/ files comes from the same source as `process.env.NODE_ENV` when that's not the case - they are entirely independent.
nextstrain-bot
temporarily deployed
to
auspice-victorlin-updat-j7iwwr
December 3, 2022 04:10
Inactive
Add global to ESLint config
nextstrain-bot
temporarily deployed
to
auspice-victorlin-updat-j7iwwr
December 3, 2022 04:35
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
See commit messages. I thought of these while working on #1520, but believe these changes can be made independently of the Webpack upgrade.
Tasks
Related issue(s)
N/A
Testing