Skip to content

Commit

Permalink
feat(mp): vue3
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Jul 27, 2021
1 parent a55489a commit db26b9d
Show file tree
Hide file tree
Showing 7 changed files with 244 additions and 153 deletions.
9 changes: 8 additions & 1 deletion packages/uni-cli-shared/lib/preprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ module.exports = function initPreprocess (name, platforms, userDefines = {}) {
defaultContext[normalize(name)] = false
})

defaultContext.VUE2 = true
if (process.env.UNI_USING_VUE3) {
defaultContext.VUE3 = true
} else {
defaultContext.VUE2 = true
}
// nvue 只支持vue2
nvueContext.VUE2 = true
nvueContext.VUE3 = false

vueContext[normalize(name)] = true

Expand Down
Loading

0 comments on commit db26b9d

Please sign in to comment.