Skip to content

Commit

Permalink
fix(App): 设置 nvueStyleCompiler 缺省配置为 weex
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed Feb 3, 2021
1 parent ffc7279 commit ecf4775
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/vue-cli-plugin-uni/lib/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if (
const defaultOutputDir = '../../../../dist/' +
(process.env.NODE_ENV === 'production' ? 'build' : 'dev') + '/' +
(process.env.UNI_SUB_PLATFORM || process.env.UNI_PLATFORM)


process.env.UNI_OUTPUT_DEFAULT_DIR = path.resolve(__dirname, defaultOutputDir)
if (process.env.UNI_OUTPUT_DIR && process.env.UNI_OUTPUT_DIR.indexOf('./') === 0) {
process.env.UNI_OUTPUT_DIR = path.resolve(process.cwd(), process.env.UNI_OUTPUT_DIR)
Expand Down Expand Up @@ -243,8 +243,10 @@ if (isNVueCompiler) {
process.env.UNI_USING_NVUE_COMPILER = true
}

if (platformOptions.nvueStyleCompiler !== 'weex') {
if (platformOptions.nvueStyleCompiler === 'uni-app') {
process.env.UNI_USING_NVUE_STYLE_COMPILER = true
} else {
platformOptions.nvueStyleCompiler = 'weex'
}

if (platformOptions.usingComponents === true) {
Expand Down Expand Up @@ -451,4 +453,4 @@ runByHBuilderX && console.log('正在编译中...')

module.exports = {
manifestPlatformOptions: platformOptions
}
}

0 comments on commit ecf4775

Please sign in to comment.