- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38
Closed
Description
`import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
plugins: [
vue(),
vueJsx({
babelPlugins: [
['@babel/plugin-proposal-decorators', { legacy: true }],//不加这个会报错
],
}),
]
`
tsx文件中,使用@component 没有问题,加了  @prop 就报错
`
import { Component, Prop, Vue, Emit, Watch } from 'vue-facing-decorator'
@component({})
export default class Login extends Vue {
@prop() test!: Boolean //加上这个会报错
render() {
return (
test
)
}
}
`
报错内容如下
[plugin:vite:vue-jsx] unknown file: Definitely assigned fields cannot be initialized here, but only in the constructor
Metadata
Metadata
Assignees
Labels
No labels