Files
vue-ts-example/src/main.ts
严浩 f3e6dbcc0e
All checks were successful
/ depcheck (push) Successful in 1m12s
/ playwright (push) Successful in 1m19s
/ build-and-deploy-to-vercel (push) Successful in 2m32s
feat: 添加 @formkit/auto-animate 插件
2024-12-26 18:38:35 +08:00

20 lines
532 B
TypeScript

import './styles';
import App from './App.vue';
async function init() {
const app = createApp(App);
{
// https://github.com/antfu-collective/vitesse/blob/47618e72dfba76c77b9b85b94784d739e35c492b/src/modules/README.md
type UserPluginContext = { app: import('vue').App<Element> };
type UserPlugin = (ctx: UserPluginContext) => void;
Object.values(import.meta.glob<{ install: UserPlugin }>('./plugins/*.ts', { eager: true })).forEach((i) =>
i.install?.({ app }),
);
}
app.mount('#app');
}
init();