Skip to content

Commit

Permalink
fix(taro-cli): fix taro weapp watch entry file
Browse files Browse the repository at this point in the history
修改微信小程序监听文件修改时,判断是否是entryFile的bug
  • Loading branch information
pamler authored and yanbin.ge committed Feb 21, 2019
1 parent fe8c12e commit f2ff8c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-cli/src/weapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -2046,7 +2046,7 @@ function watchFiles () {
const extname = path.extname(filePath)
// 编译JS文件
if (Util.REG_SCRIPT.test(extname) || Util.REG_TYPESCRIPT.test(extname)) {
if (filePath.indexOf(entryFileName) >= 0) {
if (path.basename(filePath, extname) === entryFileName) {
Util.printLog(Util.pocessTypeEnum.MODIFY, '入口文件', `${sourceDirName}/${entryFileName}.js`)
const config = await buildEntry()
// TODO 此处待优化
Expand Down

0 comments on commit f2ff8c1

Please sign in to comment.