diff --git a/src/node/plugins/rewritesPlugin.ts b/src/node/plugins/rewritesPlugin.ts index ebda4d4f..2388a70a 100644 --- a/src/node/plugins/rewritesPlugin.ts +++ b/src/node/plugins/rewritesPlugin.ts @@ -7,7 +7,7 @@ export function resolveRewrites( userRewrites: UserConfig['rewrites'] ) { const rewriteRules = Object.entries(userRewrites || {}).map(([from, to]) => ({ - toPath: compile(to), + toPath: compile(to, { validate: false }), matchUrl: match(from.startsWith('^') ? new RegExp(from) : from) }))