Skip to content

Commit

Permalink
fix(cli): 小程序编译 watch 时修改组件不更新
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Jun 15, 2018
1 parent 781a794 commit 5e593f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/taro-cli/src/weapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,10 @@ function watchFiles () {
let outoutShowFilePath = filePath.replace(appPath + path.sep, '')
outoutShowFilePath = outoutShowFilePath.split(path.sep).join('/')
Util.printLog(Util.pocessTypeEnum.MODIFY, '组件文件', outoutShowFilePath)
const hasbeenBuiltIndex = hasBeenBuiltComponents.indexOf(filePath)
if (hasbeenBuiltIndex >= 0) {
hasBeenBuiltComponents.splice(hasbeenBuiltIndex, 1)
}
await buildSingleComponent(filePath)
} else {
let isImported = false
Expand Down

0 comments on commit 5e593f0

Please sign in to comment.