1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

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

This commit is contained in:
Maciej Kasprzyk 2017-12-14 22:22:04 +01:00 committed by Arunoda Susiripala
parent 702dd5d3f4
commit a3aa870b74

View file

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