From 51f3bbfd23b738d82de7968ff15dbd5767ad86f5 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 1 Apr 2022 11:15:00 +0100 Subject: [PATCH] fix(vite): update regex to handle new vite output format (#4014) --- packages/vite/src/plugins/dynamic-base.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vite/src/plugins/dynamic-base.ts b/packages/vite/src/plugins/dynamic-base.ts index 7fbd177598..80b4ab0271 100644 --- a/packages/vite/src/plugins/dynamic-base.ts +++ b/packages/vite/src/plugins/dynamic-base.ts @@ -75,10 +75,10 @@ export const DynamicBasePlugin = createUnplugin(function (options: DynamicBasePl s.replace(/from *['"]\/__NUXT_BASE__(\/[^'"]*)['"]/g, 'from "$1"') // Dynamically compute string URLs featuring baseURL - for (const delimiter of ['`', '"', "'"]) { - const delimiterRE = new RegExp(`(? '`' + r.replace(/\/__NUXT_BASE__\//g, '${__publicAssetsURL()}').slice(1, -1) + '`') } if (s.hasChanged()) {