Skip to content

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>
fireairforce pushed a commit that referenced this pull request Jul 24, 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