提交 faef944f 编写于 作者: W Wu Rui 提交者: qiang

修复没有给 UNI_PLATFORM 赋默认值导致 VSCode ESLint 插件运行不正常的问题

# Conflicts:
#	packages/vue-cli-plugin-uni/lib/env.js
上级 0edd43ec
...@@ -23,6 +23,7 @@ const manifestJsonObj = require('@dcloudio/uni-cli-shared/lib/manifest').getMani ...@@ -23,6 +23,7 @@ const manifestJsonObj = require('@dcloudio/uni-cli-shared/lib/manifest').getMani
process.env.UNI_APP_ID = manifestJsonObj.appid || '' process.env.UNI_APP_ID = manifestJsonObj.appid || ''
process.env.UNI_APP_NAME = manifestJsonObj.name || '' process.env.UNI_APP_NAME = manifestJsonObj.name || ''
process.env.UNI_PLATFORM = process.env.UNI_PLATFORM || 'h5'
// 小程序 vue3 标记 // 小程序 vue3 标记
if (process.env.UNI_PLATFORM.indexOf('mp-') === 0) { if (process.env.UNI_PLATFORM.indexOf('mp-') === 0) {
...@@ -497,4 +498,4 @@ runByHBuilderX && console.log(uniI18n.__('compiling')) ...@@ -497,4 +498,4 @@ runByHBuilderX && console.log(uniI18n.__('compiling'))
module.exports = { module.exports = {
manifestPlatformOptions: platformOptions manifestPlatformOptions: platformOptions
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册