Closed ngjuping closed 2 years ago
I agree. I'm wondering what happened.
For now, try setting the line in vite.config.ts to false
or commenting it out.
Not only is the build slower, but it is recreated every time devserver is started, so I was wondering if it should be set to true
by default.
Hi logue,
I have tried changing that but eslint still complains about the decorator not found...
error 'Component' is not defined
Any ideas?
I found out what caused the build to be heavy, but it wasn't. Also, since unnecessary settings were included, it was supported in 0.4.7.
Hi logue,
I have tried changing that but eslint still complains about the decorator not found...
error 'Component' is not defined
Any ideas?
Are you using any external component library (such as vue-codemirror6 or vuetify-swatches )?
If you feel something is wrong, please run yarn run clean
.
Hi logue,
I think I have delivered my confusion incorrectly.
Here's what I expected:
<script lang="ts">
@Component
export default class App extends mixins(Global) {}
</script>
No imports for Component decorator required. I have tried doing this in main.ts
:
global.Component = Component
and use it like @global.Component
, which has failed.
Do you think this is a good idea?
I think it's because the following line is missing.
import { Component, Vue } from 'vue-property-decorator';
There should have been no way to omit it in vue2... Also, Vue 2.7, which is currently in alpha release, supports composition api by default, so due to conflicting concerns, we have no plans to implement it, if possible.
Hi logue,
As components grow in quantity, repetitive imports of decorators such as Component and Prop from vue-property-decorator becomes bulky. In this template, auto import of components is achieved by
components.d.ts
which declares component globally. Is there something similar to this that can be done to remove the imports of decorators as well?Best regards, Ju Ping