diff --git a/packages/taro-webpack-runner/src/util/chain.ts b/packages/taro-webpack-runner/src/util/chain.ts index dbf5e64b59ac..fa3d81b56cae 100644 --- a/packages/taro-webpack-runner/src/util/chain.ts +++ b/packages/taro-webpack-runner/src/util/chain.ts @@ -349,7 +349,7 @@ const getModule = ({ esnextModuleRegs = esnextModuleRegs.concat([ ...esnextModules.map(v => { if (typeof v === 'string') { - return new RegExp(`\b${v}\b`) + return new RegExp(`\\b${v}\\b`) } else { return v }