fix: fix merge of project config

This commit is contained in:
dntzhang 2019-08-20 12:24:29 +08:00
parent dc68048490
commit aad8cec887
3 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,14 @@
# 更新日志
## next version
## v0.0.1
修复非 vue 下 this.app.$destroy() 报错问题
## v0.0.2
解决 react 报错问题
## v0.0.3
* 解决重复加入条件编译的问题
* 拼写错误

View File

@ -48,5 +48,5 @@
"url": "git+https://github.com/wechat-miniprogram/kbone.git"
},
"scripts": {},
"version": "0.0.2"
"version": "0.0.3"
}

View File

@ -205,9 +205,9 @@ class MpPlugin {
addFile(compilation, '../config.js', configJsContent)
// project.config.json
const userPorjectConfigJson = options.projectConfig || {}
const projectConfigJson = Object.assign({}, projectConfigJsonTmpl)
const projectConfigJsonContent = JSON.stringify(_.merge(projectConfigJson, userPorjectConfigJson), null, '\t')
const userProjectConfigJson = options.projectConfig || {}
const projectConfigJson = JSON.parse(JSON.stringify(projectConfigJsonTmpl))
const projectConfigJsonContent = JSON.stringify(_.merge(projectConfigJson, userProjectConfigJson), null, '\t')
addFile(compilation, '../project.config.json', projectConfigJsonContent)
// package.json