Incorrect output when using vite 8
bug
### Environment
Vue project with unplugin-auto-import, with vite 8, unplugin-auto-import with includes: ["vue"].
### Reproduction
Using default configuration with rolldown, giving codes below:
```js
const v = ref()
function foo(){
const ref = JSON.parse("{}");
return ref;
}
```
And then in the output bundle, the symbol `ref` in package vue will be stripped.
### Describe the bug
The reason for the bug is when processing codes in `detectImportsRegex`, expression `const ref = ...` inside `foo` will match excludeRE and be removed from `occurrenceMap`. It wont happend with esbuild, which will give the output `const ref2 = ...` to avoid name conflict.
### Additional context
_No response_
### Logs
```sh
```
0 条评论