-
Notifications
You must be signed in to change notification settings - Fork 698
Closed
Description
At the moment, Rolldown will try to replace const values if a symbol is exported to other modules. On a module-level, Rolldown does nothing as Oxc is taking care of the inlining already.
This gives room for optimization: Constant values can be propagated if the variable is used top-level.
Expected result:
const prod = 'PROD';
console.log(prod);Or even inlined as console.log('PROD');
Related: #4258
Reactions are currently unavailable