Skip to content

Commit 8c9833c

Browse files
committed
test: fix dynamic routes test for build
1 parent 956de3b commit 8c9833c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

__tests__/e2e/__snapshots__/home.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Vitest Snapshot v1
1+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`render correct content > main content 1`] = `
44
[

__tests__/e2e/static-data/__snapshots__/data.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Vitest Snapshot v1
1+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`static data file support in vite 3 > render correct content 1`] = `
44
[

src/node/plugins/dynamicRoutesPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const dynamicRoutesPlugin = async (
5757

5858
resolveId(id) {
5959
if (!id.endsWith('.md')) return
60-
const normalizedId = id.startsWith(config.root)
60+
const normalizedId = id.startsWith(config.srcDir)
6161
? id
6262
: normalizePath(path.resolve(config.srcDir, id.replace(/^\//, '')))
6363
const matched = config.dynamicRoutes.routes.find(

0 commit comments

Comments
 (0)