From c451463a3db32f26651af621624fdf52b253b988 Mon Sep 17 00:00:00 2001 From: Yuan Qing Lim Date: Thu, 10 Oct 2024 22:03:54 +0800 Subject: [PATCH] Swap order of replacements --- .../utilities/build-bundles-async/esbuild-css-modules-plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/build/src/utilities/build-bundles-async/esbuild-css-modules-plugin.ts b/packages/build/src/utilities/build-bundles-async/esbuild-css-modules-plugin.ts index 286f85983..f79655e20 100644 --- a/packages/build/src/utilities/build-bundles-async/esbuild-css-modules-plugin.ts +++ b/packages/build/src/utilities/build-bundles-async/esbuild-css-modules-plugin.ts @@ -81,7 +81,7 @@ const backQuoteRegex = /`/g const backSlashRegex = /\\/g function escapeCss(css: string) { - return css.replace(backQuoteRegex, '\\`').replace(backSlashRegex, '\\\\') + return css.replace(backSlashRegex, '\\\\').replace(backQuoteRegex, '\\`') } async function createGlobalCssJavaScriptAsync(