Open vacnex opened 1 year ago
That cannot work in ts
file. You can try another plugin named unplugin-auto-import.
That cannot work in
ts
file. You can try another plugin named unplugin-auto-import.
use this: https://github.com/antfu/unplugin-auto-import. Then add this to your config file:
import AutoImport from 'unplugin-auto-import/vite'
export default defineConfig() {
plugins: [
AutoImport({
include: [
/\.[tj]sx?$/,
],
imports: [
{
'[file-name]': [
['default', 'ComponetName' ],
],
},
],
}),
}
Describe the bug
I'm currently using vue-route, it's content component prop, so I dont know how to use component in this file Sorry for my bad english
Reproduction
declare config in vite-config => cannot use it in ts file route
System Info
Used Package Manager
npm
Validations