Skip to content

Commit

Permalink
fix: serialize route patterns as per validation pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
jackiewmacharia committed Aug 18, 2022
1 parent f8e3853 commit 100cce7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ async function createEdgeManifest(routes: RouteData[], entryFile: string, dir: U
} else {
functions.push({
function: entryFile,
pattern: route.pattern.toString(),
// serialize pattern, expected format: ^/work/([^/]+?)/([^/]+?)/?$
// https://github.com/netlify/edge-bundler/blob/main/src/manifest.ts#L34
pattern: route.pattern.source.replace(/\\\//g, '/').toString(),
});
}
}
Expand Down

0 comments on commit 100cce7

Please sign in to comment.