diff --git a/packages/uni-cli-shared/lib/cache.js b/packages/uni-cli-shared/lib/cache.js index cb666134a68169051bed303fc39d7b35876e5689..e2f27650e67b37dd5336824b30dc1f23d29e3e0e 100644 --- a/packages/uni-cli-shared/lib/cache.js +++ b/packages/uni-cli-shared/lib/cache.js @@ -87,7 +87,7 @@ function updateComponentJson (name, jsonObj, usingComponents = true, type = 'Com const oldJsonObj = JSON.parse(oldJsonStr) jsonObj.usingComponents = oldJsonObj.usingComponents || {} jsonObj.usingAutoImportComponents = oldJsonObj.usingAutoImportComponents || {} - if(oldJsonObj.genericComponents) { + if (oldJsonObj.genericComponents) { jsonObj.genericComponents = oldJsonObj.genericComponents } if (oldJsonObj.usingGlobalComponents) { // 复制 global components(针对不支持全局 usingComponents 的平台) diff --git a/packages/vue-cli-plugin-uni/lib/h5/index.js b/packages/vue-cli-plugin-uni/lib/h5/index.js index 2072a04d4fca01545daec95f79b952e683589a66..82a26ba4f54c627789432d91b96a678f1106f827 100644 --- a/packages/vue-cli-plugin-uni/lib/h5/index.js +++ b/packages/vue-cli-plugin-uni/lib/h5/index.js @@ -155,6 +155,9 @@ module.exports = { } }, plugins, + optimization: { + moduleIds: 'hashed' + }, devServer: { watchOptions: require('../util').getWatchOptions() }