Skip to content

use decorator before export default may cause compilation problems #12745

@linshuohao

Description

@linshuohao

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions