@W-22185056: Add BUILD_VARIANT concept with single "default" variant#327
Open
anyoung-tableau wants to merge 3 commits intoanyoung/tools-web-folderfrom
Open
@W-22185056: Add BUILD_VARIANT concept with single "default" variant#327anyoung-tableau wants to merge 3 commits intoanyoung/tools-web-folderfrom
anyoung-tableau wants to merge 3 commits intoanyoung/tools-web-folderfrom
Conversation
| outfile: './build/index.js', | ||
| }); | ||
| // https://esbuild.github.io/api/#define | ||
| define: { |
Contributor
There was a problem hiding this comment.
Design Q: do we want BUILD_VARIANT to be runtime-readable outside the variant entry points at all?
The entry-point swap already gives us a clean build boundary, and exposing import.meta.env.BUILD_VARIANT more broadly seems like it could invite shared modules to grow variant conditionals over time
Keep variant selection constrained to the entry/build layer unless a concrete use case shows up?
Collaborator
Author
There was a problem hiding this comment.
Good callout. I tried to get stuff working without using define at all, but it got kinda messy. Let me give it another shot.
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.
These changes introduce the concept of build variants which serve 2 purposes: