Skip to content

feat(turbopack): support more types of compile time define env #33

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

Merged
merged 9 commits into from
Jul 9, 2025

Conversation

xusd320
Copy link

@xusd320 xusd320 commented Jul 9, 2025

What

Let compile-time define env supports full types of json and basical evaluation. See examples at

https://github.com/umijs/next.js/blob/feat/upstream-turboapack-define-env/turbopack/crates/turbopack-tests/tests/snapshot.rs#L261-L286

This may also improve the minification because more static informations being provided when handling define env. But this change may affect the ecmascript analysis and tree-shaking, so need a careful review.

@xusd320 xusd320 requested review from elrrrrrrr and fireairforce July 9, 2025 03:10
@xusd320 xusd320 merged commit b390ac1 into utoo Jul 9, 2025
14 of 27 checks passed
fireairforce pushed a commit that referenced this pull request Jul 15, 2025
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants