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 changed the title Feat/upstream turboapack define env feat(turbopack): improve compile-time define value to support more data types and expr evaluation Jul 9, 2025
@xusd320
Copy link
Author

xusd320 commented Jul 9, 2025

Upstream PR: vercel#81042

@xusd320 xusd320 requested review from elrrrrrrr and fireairforce July 9, 2025 02:17
@xusd320 xusd320 force-pushed the feat/upstream-turboapack-define-env branch from 3486fc9 to a57283a Compare July 9, 2025 02:57
@xusd320 xusd320 closed this Jul 9, 2025
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