Skip to content

Commit

Permalink
fix(webpack-runner): 配置包名兼容 windows
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Jan 29, 2019
1 parent e1adb3c commit a1feff1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-webpack-runner/src/util/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ const getModule = ({
}

const isNodemodule = filename => /\bnode_modules\b/.test(filename)
let esnextModuleRegs = [/@tarojs\/components/]
let esnextModuleRegs = [/@tarojs\/components/, /@tarojs_components/, /@tarojs\\components/]
if (Array.isArray(esnextModules) && esnextModules.length) {
/* cnpm 安装的模块名前带下划线 `_` */
esnextModuleRegs = esnextModuleRegs.concat([...esnextModules.map(v => new RegExp(`node_modules[\\\\/]_?${v}`))])
Expand Down

0 comments on commit a1feff1

Please sign in to comment.