-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Rollup Version
4.30.0
Operating System (or Browser)
MacOS 15.1
Node Version (if applicable)
bun 1.1.42 or nodejs 22
Link To Reproduction
Expected Behaviour
Bundle successfully.
Actual Behaviour
It will bundle failed when there is jspdf, because the the switch expression rendered by Module is invalid js expression.
Before the module including jspdf is render by this line, it is a valid switch expression.
Line 1250 in 958d5eb
| const rendered = module.render(renderOptions); |
But after this, it will be
switch(R){case 0:casefalse:case"fill":D=0;break;case 1:casetrue:case"stroke":D=1;break;case 2:case"fillThenStroke":D=2;break;case 3:case"invisible":D=3;break;case 4:case"fillAndAddForClipping":D=4;break;case 5:case"strokeAndAddPathForClipping":D=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":D=6;break;case 7:case"addToPathForClipping":D=7;}The statement casefalse and casetrue in it is not a valid javascript expression so that it will cause esbuild exit after.
I tried to find out why but here is some knowledge of ast I'm not familliar and I don't have so many time so that I just debug it to here.
By the way, when I user overrides to indicate [email protected] forcely, it will be bundled successfully.
Reactions are currently unavailable