diff --git a/packages/vue-cli-plugin-uni/lib/env.js b/packages/vue-cli-plugin-uni/lib/env.js index b2db648c42a726a2d09955c2911702ed9e971674..77228ceb17be47f63182bfb3ab7e060581a222c5 100644 --- a/packages/vue-cli-plugin-uni/lib/env.js +++ b/packages/vue-cli-plugin-uni/lib/env.js @@ -70,7 +70,7 @@ process.UNI_STAT_CONFIG = { let usingComponentsAbsent = false if (!platformOptions.hasOwnProperty('usingComponents')) { usingComponentsAbsent = true -} +} platformOptions.usingComponents = true // } @@ -109,10 +109,10 @@ if (process.env.UNI_PLATFORM === 'mp-qq') { // QQ小程序 强制自定义组件 platformOptions.usingComponents = true } -let isNVueCompiler = false +let isNVueCompiler = true if (process.env.UNI_PLATFORM === 'app-plus') { - if (platformOptions.nvueCompiler === 'uni-app') { - isNVueCompiler = true + if (platformOptions.nvueCompiler === 'weex') { + isNVueCompiler = false } if (platformOptions.renderer === 'native') { process.env.UNI_USING_NATIVE = true @@ -122,9 +122,9 @@ if (process.env.UNI_PLATFORM === 'app-plus') { } else { // 其他平台,待确认配置方案 if ( manifestJsonObj['app-plus'] && - manifestJsonObj['app-plus']['nvueCompiler'] === 'uni-app' + manifestJsonObj['app-plus']['nvueCompiler'] === 'weex' ) { - isNVueCompiler = true + isNVueCompiler = false } } @@ -253,9 +253,9 @@ if (runByHBuilderX) { } } } - -console.log(`正在编译中...`) + +console.log(`正在编译中...`) module.exports = { manifestPlatformOptions: platformOptions -} +} diff --git a/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js b/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js index 142bcd461008999ae62dea6ee9f9aaf8a6f8ef94..42768d3421e4e2dc495b6d605fdfedd725ea330e 100644 --- a/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js +++ b/packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js @@ -209,11 +209,11 @@ module.exports = function (pagesJson, userManifestJson) { let flexDir = false - if (manifestJson.plus.nvueCompiler && manifestJson.plus.nvueCompiler === 'uni-app') { + if (manifestJson.plus.nvueCompiler && manifestJson.plus.nvueCompiler === 'weex') { + appJson.nvueCompiler = 'weex' + } else { appJson.nvueCompiler = 'uni-app' flexDir = getFlexDirection(manifestJson.plus) - } else { - appJson.nvueCompiler = 'weex' } if (manifestJson.plus.renderer === 'native') {