Only +config.ts on directory
enri90 opened this issue · comments
enri90 commented
Description
I no longer see the pages I updated from +config.h.ts to +config.ts by updating the module
[vike][Warning] Update to the new V1 design to get rid of Vite's warning: The glob option "as" has been deprecated in favour of "query". See https://vike.dev/migration/v1-design for how to migrate.
The glob option "as" has been deprecated in favour of "query". Please update `as: 'extractExportNames'` to `query: '?extractExportNames'`.
vike:routing Pages routes: []
Error: [vike][Wrong Usage] No *.page.js file found. You must create at least one *.page.js file.
/pages/login/+config.ts
import type { Config } from 'vike/types';
import Layout from '@test-module/base/layout/LayoutNullBack';
import Page from '@test-module/login/pages/general';
import guard from '@test-module/login/guard';
import onBeforeRender from '@test-module/login/onBeforeRender';
export default {
onBeforeRender,
Page,
title: 'Login',
Layout,
guard,
} satisfies Config;
Rom commented
That's indeed unexpected. If you can publish a reproduction, that'd be the best.
enri90 commented
Found the solution I have to use import
import type { Config } from 'vike/types';
export default {
title: 'Login',
onBeforeRender: 'import:@test-module/login/onBeforeRender:default',
Layout: 'import:@test-module/base/layout/LayoutNullBack:default',
Page: 'import:@test-module/login/pages/general:default',
guard: 'import:@test-module/login/guard:default',
} satisfies Config;
thx
Rom commented
👍 Closing but reproduction welcome if you believe the error message was misleading (which seems to be the case).