diff --git a/packages/preset-umi/src/utils/transformIEAR.ts b/packages/preset-umi/src/utils/transformIEAR.ts index 6fe57637eb9a..6874fad31820 100644 --- a/packages/preset-umi/src/utils/transformIEAR.ts +++ b/packages/preset-umi/src/utils/transformIEAR.ts @@ -70,7 +70,7 @@ export const IEAR_REG_EXP = new RegExp( // match quotes ($2) `('|")`, // match absolute file path ($3) - `(\\/.*[^\\\\])\\2`, + `((?:[a-zA-Z]:|\\/).*[^\\\\])\\2`, ')', ].join(''), // match full-content