We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60099f4 commit 4566babCopy full SHA for 4566bab
packages/slidev/node/vite/loaders.ts
@@ -92,18 +92,16 @@ export function createSlidesLoader(
92
93
const layouts: Record<string, string> = {}
94
95
- for (const root of [...roots, clientRoot]) {
+ for (const root of [clientRoot, ...roots]) {
96
const layoutPaths = await fg('layouts/**/*.{vue,ts}', {
97
cwd: root,
98
absolute: true,
99
suppressErrors: true,
100
})
101
102
for (const layoutPath of layoutPaths) {
103
- const layout = path.basename(layoutPath).replace(/\.\w+$/, '')
104
- if (layouts[layout])
105
- continue
106
- layouts[layout] = layoutPath
+ const layoutName = path.basename(layoutPath).replace(/\.\w+$/, '')
+ layouts[layoutName] = layoutPath
107
}
108
109
0 commit comments