Skip to content

Commit

Permalink
fix(cli): 小程序引用 ts 文件后缀未重写为 .js
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed May 20, 2019
1 parent a867082 commit d8474ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/taro-cli/src/mini/astProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ function analyzeImportUrl ({
if (scriptFiles.indexOf(fPath) < 0) {
scriptFiles.push(fPath)
}
node.source.value = value.replace(valueExtname, '.js')
} else if (REG_JSON.test(valueExtname)) {
const vpath = path.resolve(sourceFilePath, '..', value)
if (jsonFiles.indexOf(vpath) < 0) {
Expand Down

0 comments on commit d8474ab

Please sign in to comment.