Skip to content

Commit

Permalink
fix(v3): compatible with renderer='native'
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Apr 1, 2020
1 parent ae6acff commit 469359e
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,7 @@ module.exports = function (pagesJson, userManifestJson) {
appJson.nvueCompiler = 'weex'
}

if (
manifestJson.plus.renderer === 'native' &&
!process.env.UNI_USING_V3_NATIVE // v3+native时,renderer为'auto'
) {
if (manifestJson.plus.renderer === 'native') {
appJson.renderer = 'native'
} else {
appJson.renderer = 'auto'
Expand Down Expand Up @@ -376,7 +373,11 @@ module.exports = function (pagesJson, userManifestJson) {

manifestJson.plus['uni-app'].control = control
manifestJson.plus['uni-app'].nvueCompiler = appJson.nvueCompiler
manifestJson.plus['uni-app'].renderer = appJson.renderer
// v3 + native 时强制 auto
manifestJson.plus['uni-app'].renderer = process.env.UNI_USING_V3_NATIVE
? 'auto'
: appJson.renderer

if (flexDir) {
manifestJson.plus['uni-app'].nvue = {
'flex-direction': flexDir
Expand Down

0 comments on commit 469359e

Please sign in to comment.