Skip to content

Commit

Permalink
fix(mini-runner): 修复小程序编译报错
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Dec 26, 2019
1 parent dc42dde commit 8ce3f82
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/taro-mini-runner/src/plugins/MiniPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -757,10 +757,12 @@ export default class MiniPlugin {
Object.keys(taroFileTypeMap).forEach(item => {
const relativePath = item.replace(compiler.context, '')
const itemInfo = taroFileTypeMap[item]
new VirtualModulePlugin({
moduleName: relativePath,
contents: itemInfo.code
}).apply(compiler)
if (typeof itemInfo.code !== 'string') {
new VirtualModulePlugin({
moduleName: relativePath,
contents: itemInfo.code
}).apply(compiler)
}
})
}

Expand Down

0 comments on commit 8ce3f82

Please sign in to comment.