You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i migrate my project from vue-cli to vite, i meet an unexpected problem!
vue component cannot be loaded correctly when data have some specific name
code is below:
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
when i migrate my project from vue-cli to vite, i meet an unexpected problem!
vue component cannot be loaded correctly when data have some specific name
code is below:
created
method will not run.if delete the line
exportType = 'xlsx';
or thegetter
method, this component will run correctlyI guess its a bug of the compiler. It reads the 'export', 'default' word and do something wrong.
Need your help!
将项目从VueCLI迁移到Vite时遇到了问题。代码如上文。当Vue组件有一个数据叫
exportType
,一个getter中包含叫default
的取值时,这个组件无法正常运行,created
方法不执行。把exportType = 'xlsx';
那行或者getter
删掉就正常了。猜测是编译器把
export
和default
读到了一起,然后编译错了东西?需要你的帮助!
Reproduction
https://stackblitz.com/edit/vitejs-vite-s1r7wy?file=src%2Fcomponents%2FExportIssues.vue
Steps to reproduce
No response
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: