diff --git a/packages/vue-cli-plugin-uni-optimize/packages/webpack-optimize-plugin/api.js b/packages/vue-cli-plugin-uni-optimize/packages/webpack-optimize-plugin/api.js index 33ac4a5fdf71820aa4dfe21b5d2fead54f1da872..407a0de7a687b11021e739b5bfe6e8c1e3b4dc0e 100644 --- a/packages/vue-cli-plugin-uni-optimize/packages/webpack-optimize-plugin/api.js +++ b/packages/vue-cli-plugin-uni-optimize/packages/webpack-optimize-plugin/api.js @@ -102,7 +102,7 @@ const isAppComponents = filepath => { const isCoreComponents = filepath => { return path.extname(filepath) === '.vue' && - filepath.indexOf('/core/view/components/') === 0 + (filepath.indexOf('/core/view/components/') === 0 || filepath.indexOf('/platforms/' + process.env.UNI_PLATFORM + '/view/components/') === 0) } const isAppMixins = filepath => { @@ -241,4 +241,4 @@ module.exports = function updateApis (apis = new Set(), userApis = new Set()) { updateCoreComponents(coreComponentsPaths) updateAppMixins(appMixinsPaths) updateSystemRoutes(systemRoutesPaths) -} +}