Commit a3aa870b authored by Maciej Kasprzyk's avatar Maciej Kasprzyk Committed by Arunoda Susiripala

feat: error when exported path has no backslash (#3456)

parent 702dd5d3
...@@ -91,6 +91,9 @@ export default async function (dir, options, configuration) { ...@@ -91,6 +91,9 @@ export default async function (dir, options, configuration) {
for (const path of exportPaths) { for (const path of exportPaths) {
log(` exporting path: ${path}`) log(` exporting path: ${path}`)
if (!path.startsWith('/')) {
throw new Error(`path "${path}" doesn't start with a backslash`)
}
const { page, query = {} } = exportPathMap[path] const { page, query = {} } = exportPathMap[path]
const req = { url: path } const req = { url: path }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment