test: fix dynamic routes test for build

pull/2010/head
Evan You 2 years ago
parent 956de3bfa2
commit 8c9833ceba

@ -1,4 +1,4 @@
// Vitest Snapshot v1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`render correct content > main content 1`] = `
[

@ -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`] = `
[

@ -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(

Loading…
Cancel
Save