From a4da226c7c7c3de85431d8ff46fa1ed5d0f45926 Mon Sep 17 00:00:00 2001 From: qiang Date: Mon, 21 Oct 2019 18:25:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dh5=E5=BC=80=E5=90=AFtr?= =?UTF-8?q?eeShaking=E5=90=8E=E7=BC=96=E8=AF=91picker=E5=92=8Cpicker-view?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/webpack-optimize-plugin/component.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vue-cli-plugin-uni-optimize/packages/webpack-optimize-plugin/component.js b/packages/vue-cli-plugin-uni-optimize/packages/webpack-optimize-plugin/component.js index f8584d173..ac90ac23b 100644 --- a/packages/vue-cli-plugin-uni-optimize/packages/webpack-optimize-plugin/component.js +++ b/packages/vue-cli-plugin-uni-optimize/packages/webpack-optimize-plugin/component.js @@ -20,12 +20,12 @@ module.exports = function updateComponents(tags) { autoloadTags.root.forEach(tagName => { tags.add(tagName) }) - tags = [...tags] Object.keys(autoloadTags.other).forEach(tagName => { - if (tags.includes(tagName)) { - tags.push(...autoloadTags.other[tagName]) + if (tags.has(tagName)) { + autoloadTags.other[tagName].forEach(tag => tags.add(tag)) } }) + tags = [...tags] const importsStr = tags.map(tagName => { if (platformTags.indexOf(tagName) !== -1) { return `import ${capitalize(camelize(tagName))} from 'uni-platform/view/components/${tagName}'` -- GitLab