From 0316a7c346ae63fb5d7b4003c2a1c0254fcb3941 Mon Sep 17 00:00:00 2001 From: Qingyu Wang Date: Sun, 29 Mar 2026 17:36:58 +0800 Subject: [PATCH] fix: escape dot in virtual utilities RegExp --- src/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 7bbba99..b3bb9f5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -188,7 +188,14 @@ ${code}`; api.modifyBundlerChain((chain) => { chain.module .rule('tailwindcss') - .resource(new RegExp(VIRTUAL_UTILITIES_ID.replace(/\//g, '[\\\\/]'))) + .resource( + new RegExp( + VIRTUAL_UTILITIES_ID.replace(/\//g, '[\\\\/]').replace( + /\./g, + '\\.', + ), + ), + ) .use('tailwindcss') .loader(require.resolve('./loader')) .options({