Skip to content

Commit

Permalink
fix(cli): 插件编译时,plugin 内的 json 文件也需要修改 npm 路径,fix #3794
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen-jj committed Aug 22, 2019
1 parent 29c4dc6 commit 346778c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-cli/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ async function buildWxPlugin (appPath, { watch }) {
compilePluginJson(pluginJson, path.join(pluginPath, PLUGIN_JSON))

// plugin 文件夹内对 npm 的引用路径修改
const names = glob.sync('plugin/{,!(npm)/**/}*.js')
const names = glob.sync('plugin/{,!(npm)/**/}?(*.js|*.json)')
const ioPromises = names.map(name => {
const content = fs.readFileSync(name).toString()

Expand Down

0 comments on commit 346778c

Please sign in to comment.