提交 abdf9849 编写于 作者: fxy060608's avatar fxy060608 提交者: qiang

chore(h5): optimization.moduleIds = 'hashed'

# Conflicts:
#	packages/uni-cli-shared/lib/cache.js
上级 30f3c9d6
......@@ -82,11 +82,14 @@ function updateComponentJson (name, jsonObj, usingComponents = true, type = 'Com
const oldJsonStr = getJsonFile(name)
if (oldJsonStr) { // update
if (usingComponents) { // merge usingComponents
if (usingComponents) { // merge usingComponents
// 其实直接拿新的 merge 到旧的应该就行
const oldJsonObj = JSON.parse(oldJsonStr)
jsonObj.usingComponents = oldJsonObj.usingComponents || {}
jsonObj.usingComponents = oldJsonObj.usingComponents || {}
jsonObj.usingAutoImportComponents = oldJsonObj.usingAutoImportComponents || {}
if (oldJsonObj.genericComponents) {
jsonObj.genericComponents = oldJsonObj.genericComponents
}
if (oldJsonObj.usingGlobalComponents) { // 复制 global components(针对不支持全局 usingComponents 的平台)
jsonObj.usingGlobalComponents = oldJsonObj.usingGlobalComponents
}
......@@ -351,4 +354,4 @@ module.exports = {
updateGenericComponents,
getChangedJsonFileMap,
getSpecialMethods
}
}
......@@ -155,6 +155,9 @@ module.exports = {
}
},
plugins,
optimization: {
moduleIds: 'hashed'
},
devServer: {
watchOptions: require('../util').getWatchOptions()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册