chore: fix lint & type

This commit is contained in:
YunYouJun
2022-08-08 01:56:04 +08:00
parent eb06ad91a7
commit b8a4ee2c0b
2 changed files with 6 additions and 3 deletions

View File

@@ -8,6 +8,8 @@ import './styles/css-vars.scss'
import './styles/index.scss'
import 'uno.css'
import type { UserModule } from '~/types'
const routes = setupLayouts(generatedRoutes)
// https://github.com/antfu/vite-ssg
@@ -16,6 +18,7 @@ export const createApp = ViteSSG(
{ routes, base: import.meta.env.BASE_URL },
(ctx) => {
// install all modules under `modules/`
Object.values(import.meta.globEager('./modules/*.ts')).forEach(i => i.install?.(ctx))
Object.values(import.meta.glob<{ install: UserModule }>('./modules/*.ts', { eager: true }))
.forEach(i => i.install?.(ctx))
},
)