Closed traviscooper closed 3 months ago
If I rename the +Layout.tsx
to Layout.tsx
, it works properly and only applies it once.
Implies that the +Layout
files are applied regardless of the +config.ts
settings, instead of being replaced by the +config.ts
layout setting.
Since +Layout
is cumulative, I'd argue it works as intended.
But let me know if you believe it can cause a concrete issue.
Working on the following example: examples/full.
Layout
is defined in the root/pages
folder./pages/starship
there's anotherLayout
component, which works perfectlyas-is
.+config.ts
inside/pages/starship
that simply redefines whatLayout
component to use:import type { Config } from 'vike/types' import { Layout } from './+Layout'; import { Page } from './+Page';
// Default configs (can be overridden by pages) const config = { title: 'TESTING', Layout: Layout, // Reference to what's already being used, shouldn't affect anything Page: Page, } satisfies Config