-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
Rollup Version
4.29.0
Operating System (or Browser)
Mac
Node Version (if applicable)
No response
Link To Reproduction
https://github.com/natew/rollup-bug
Expected Behaviour
To repro:
git clone git@github.com:natew/rollup-bug.git
cd rollup-bug
yarn
yarn dev
curl http://127.0.0.1:8081/index.bundle\?platform\=ios > ~/tmp/out.js
You'll see an error:
Actual Behaviour
Error:
at Array.push (<anonymous>)
at LogicalExpression.getLiteralValueAtPath (file:///private/tmp/s2/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:13090:53)
at IfStatement.getTestValue (file:///private/tmp/s2/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:12054:77)
at IfStatement.include (file:///private/tmp/s2/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:11991:36)
This is due to:
this.expressionsToBeDeoptimized.push(origin);
note that this.expressionsToBeDeoptimized.push
is set like:
this.expressionsToBeDeoptimized = EMPTY_ARRAY;
and EMPTY_ARRAY
has Object.freeze()
, so it's not mutable.
This started happening only in 4.29
JoeSlain, BranislavLazic, Chamodya-ka and choisunhwa