fix: serialize route pattern for Netlify edge

Co-authored-by: Jackie Macharia <jackiewmacharia>
This commit is contained in:
bholmesdev 2022-09-12 11:17:17 -04:00
parent 3d784f85c4
commit ac46a0d323

View file

@ -57,6 +57,10 @@ async function createEdgeManifest(routes: RouteData[], entryFile: string, dir: U
path: route.pathname,
});
} else {
console.log({
og: route.pattern.source.toString(),
new: route.pattern.source.replace(/\\\//g, '/').toString(),
});
functions.push({
function: entryFile,
// Make route pattern serializable to match expected