diff --git a/__tests__/e2e/__snapshots__/home.test.ts.snap b/__tests__/e2e/__snapshots__/home.test.ts.snap index ab5ce9c2..0c5972fc 100644 --- a/__tests__/e2e/__snapshots__/home.test.ts.snap +++ b/__tests__/e2e/__snapshots__/home.test.ts.snap @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`render correct content > main content 1`] = ` [ diff --git a/__tests__/e2e/static-data/__snapshots__/data.test.ts.snap b/__tests__/e2e/static-data/__snapshots__/data.test.ts.snap index 0e000a37..6f0bc57a 100644 --- a/__tests__/e2e/static-data/__snapshots__/data.test.ts.snap +++ b/__tests__/e2e/static-data/__snapshots__/data.test.ts.snap @@ -1,4 +1,4 @@ -// Vitest Snapshot v1 +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`static data file support in vite 3 > render correct content 1`] = ` [ diff --git a/src/node/plugins/dynamicRoutesPlugin.ts b/src/node/plugins/dynamicRoutesPlugin.ts index 9f21bd88..49e2b80a 100644 --- a/src/node/plugins/dynamicRoutesPlugin.ts +++ b/src/node/plugins/dynamicRoutesPlugin.ts @@ -57,7 +57,7 @@ export const dynamicRoutesPlugin = async ( resolveId(id) { if (!id.endsWith('.md')) return - const normalizedId = id.startsWith(config.root) + const normalizedId = id.startsWith(config.srcDir) ? id : normalizePath(path.resolve(config.srcDir, id.replace(/^\//, ''))) const matched = config.dynamicRoutes.routes.find(