-
-
Notifications
You must be signed in to change notification settings - Fork 94
Closed
Description
I've encountered an error while building, I thought there was something wrong with my configuration then I tried to reproduce using https://github.com/antfu/vitesse.
I've tried using this two approach:
- content of
main.ts:
import 'virtual:windi.css'
import './styles/main.css'
import { ViteSSG } from 'vite-ssg'
import generatedRoutes from 'virtual:generated-pages'
import { setupLayouts } from 'layouts-generated'
import { MotionPlugin } from '@vueuse/motion'
import App from './App.vue'
const routes = setupLayouts(generatedRoutes)
// https://github.com/antfu/vite-ssg
export const createApp = ViteSSG(
App,
{ routes },
(ctx) => {
ctx.app.use(MotionPlugin)
// install all modules under `modules/`
Object.values(import.meta.globEager('./modules/*.ts')).map(i => i.install?.(ctx))
},
)
- Using the module
import { MotionPlugin } from '@vueuse/motion';
import { UserModule } from '~/types';
export const install: UserModule = ({ app, isClient }) => {
isClient && app.use(MotionPlugin);
};
The build script:
cross-env NODE_ENV=production vite-ssg build
and the result of the build returns the message:

What am I missing here? thank you
Metadata
Metadata
Assignees
Labels
No labels