use decorator before export default may cause compilation problems

This issue has been tracked since 2022-08-16.

Version

2.7.8

Reproduction link

stackblitz.com

Steps to reproduce

After open the above reproduction, you will see the console shows the error: [vite] Internal server error: Cannot overwrite across a split point

What is expected?

rewriteDefault can transform

@Component
export default class App extends Vue {
  a = `;export xxx default`;
}

into

@Component
class App extends Vue {
  a = `;export xxx default`;
}
const ${as} = App

so that vite can work correctly

What is actually happening?

same as vuejs/core#6318

More Details About Repo
Owner Name vuejs
Repo Name vue
Full Name vuejs/vue
Language TypeScript
Created Date 2013-07-29
Updated Date 2022-10-05
Star Count 199788
Watcher Count 6093
Fork Count 32878
Issue Count 590

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date