From 371c4258f2baeaef25e67c04f55769bdb267f491 Mon Sep 17 00:00:00 2001 From: Robert Reinhard Date: Tue, 21 Feb 2023 14:43:41 -0800 Subject: [PATCH] Encore routes in redirects --- modules/create-netlify-redirects.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/create-netlify-redirects.js b/modules/create-netlify-redirects.js index 56619a3..d6005cd 100644 --- a/modules/create-netlify-redirects.js +++ b/modules/create-netlify-redirects.js @@ -26,7 +26,8 @@ export default function() { // Append rules rules.forEach(rule => { - redirects += `\n${rule.from} ${rule.to} ${rule.code}!` + const from = encodeURI(rule.from), to = encodeURI(rule.to) + redirects += `\n${from} ${to} ${rule.code}!` }) // Write file