diff --git a/lib/getNetlifyRoute.js b/lib/getNetlifyRoute.js index b3f899e..79378e8 100644 --- a/lib/getNetlifyRoute.js +++ b/lib/getNetlifyRoute.js @@ -9,7 +9,7 @@ // also handles catch all routes /[...param]/ -> /:* module.exports = dynamicRoute => { // replace any catch all group first - const expressified = dynamicRoute.replace(/\[\.\.\.(.*)]$/, "*"); + const expressified = dynamicRoute.replace(/\[{1,2}\.{3}(.*)]{1,2}$/, "*"); // now replace other dynamic route groups return expressified.replace(/\[(.*?)]/g, ":$1");