Open kevin82222 opened 12 months ago
Hello, Sorry, this's a question, not a issue😅
In the Vue project, we can auto import inside Vue template, like this:
// vite.config.js import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import AutoImport from 'unplugin-auto-import/vite' export default defineConfig({ plugins: [ vue(), AutoImport({ vueTemplate: true, // has this option { 'ziggy-js': [ ['default', 'route'], ], }, }), ], })
And without import route from 'ziggy-js' in .vue file.
import route from 'ziggy-js'
// App.vue <template> <a :href="route('login')">Login</a> </template>
But in Svelte, can the same function be implement?
Thanks!
我也遇到了这个问题,在模板中无法使用自动导入的方法
可能命名冲突,尝试使用其他命名并且不包含$ ,解决了
Hello, Sorry, this's a question, not a issue😅
In the Vue project, we can auto import inside Vue template, like this:
And without
import route from 'ziggy-js'
in .vue file.But in Svelte, can the same function be implement?
Thanks!