Skip to content

[Bug]: inlineConst inlines a var #5902

@dominikg

Description

@dominikg

Reproduction link or steps

https://repl.rolldown.rs/#eNptUsFqhDAU/JVHLtkFce8pPS3sdaHXWkqqcVcaX0QTu1X8974YUyt1WSQzmTeJM46sZGJkFRbqkdrOr5GJFScs97BuTGuBp6fSGKL5U4Yr9yHbHW7wHM0rJmzr1JSw1mhdmC9Mc4Nldftz3M7O5mD73SgY4WWRXRtbGexggrI1NfA4zjMkg85CsBH/Bp5hzBDAEKyrQXpSjBXqCtXZDwoIV51FzjbOinkAQBa9xFwV57vDz04EH/+7tcY1nXiNGGBEWSvBKSmeWEWmPrRTMN0oKLeooOW+YlgVw2mKgrewmDE96J+hesxRFaqUTscIGMUe6olRL2gT79gpezEmxvnbcoZh48DvSmsTtv2tj8HXV7z6zmjrSz47pr4jo1Wqze3AL9crT2bhbBpE0XRBwXR5wV62QDx1iU5r+ugWvnSY+0JhufM7iY6hpyD3BMknNtE5PRlq6aNl0w9F/gFj

What is expected?

The chunk for baz should not have inlined foo: null

What is actually happening?

it is inlined, and so the setFoo call from bar is not taken into account

System Info

repl

Any additional comments?

originally filed against rolldown-vite here: vitejs/rolldown-vite#391 , found while trying the new inlineConst: true option with sveltekit and rolldown-vite 7.1.5

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions