-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
Rollup Version
4.30.0
Operating System (or Browser)
Windows
Node Version (if applicable)
22.10.0
Link To Reproduction
Expected Behaviour
Description:
Last working version was rollup 4.29.2.
Starting with rollup 4.30.0 and up to the latest version (4.41.1), some application constants get replaced with magic number if an operator is added. This is a minor issue as the value is accurate and the code is valid. But is still a minor annoyance when building a reusable library used by multiple applications as now when debugging and stepping into the library built code you will get magic numbers and will have to check the library source code to find the origin of the numbers.
Expected:
const BOB = 3;
function getBob() {
return {x: BOB, y: -BOB, z: +BOB}
}
export { BOB, getBob };
Actual Behaviour
const BOB = 3;
function getBob() {
return {x: BOB, y: -3, z: 3}
}
export { BOB, getBob };