Skip to content

Commit

Permalink
feat(uniCloud): secure network config
Browse files Browse the repository at this point in the history
  • Loading branch information
Wangyaqi committed Oct 20, 2022
1 parent 9c1aad1 commit 5cc9106
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ const plugins = [
UNI_PLATFORM: JSON.stringify(process.env.UNI_PLATFORM),
VUE_APP_PLATFORM: JSON.stringify(process.env.UNI_PLATFORM),
UNI_CLOUD_PROVIDER: process.env.UNI_CLOUD_PROVIDER,
UNI_SECURE_NETWORK: process.env.UNI_SECURE_NETWORK,
UNI_SECURE_NETWORK_ENABLE: process.env.UNI_SECURE_NETWORK_ENABLE,
UNI_SECURE_NETWORK_CONFIG: process.env.UNI_SECURE_NETWORK_CONFIG,
UNICLOUD_DEBUG: process.env.UNICLOUD_DEBUG,
RUN_BY_HBUILDERX: process.env.RUN_BY_HBUILDERX,
UNI_AUTOMATOR_WS_ENDPOINT: JSON.stringify(process.env.UNI_AUTOMATOR_WS_ENDPOINT),
Expand Down
3 changes: 2 additions & 1 deletion packages/vue-cli-plugin-uni/lib/chain-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ module.exports = function chainWebpack (platformOptions, vueOptions, api) {
'process.env.UNI_PLATFORM': JSON.stringify(process.env.UNI_PLATFORM),
'process.env.UNI_SUB_PLATFORM': JSON.stringify(process.env.UNI_SUB_PLATFORM),
'process.env.UNI_CLOUD_PROVIDER': process.env.UNI_CLOUD_PROVIDER,
'process.env.UNI_SECURE_NETWORK': process.env.UNI_SECURE_NETWORK,
'process.env.UNI_SECURE_NETWORK_ENABLE': process.env.UNI_SECURE_NETWORK_ENABLE,
'process.env.UNI_SECURE_NETWORK_CONFIG': process.env.UNI_SECURE_NETWORK_CONFIG,
'process.env.UNICLOUD_DEBUG': process.env.UNICLOUD_DEBUG,
'process.env.RUN_BY_HBUILDERX': process.env.RUN_BY_HBUILDERX,
'process.env.UNI_AUTOMATOR_WS_ENDPOINT': JSON.stringify(process.env.UNI_AUTOMATOR_WS_ENDPOINT),
Expand Down
4 changes: 2 additions & 2 deletions packages/vue-cli-plugin-uni/lib/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ if (!process.env.UNI_CLOUD_PROVIDER && process.env.UNI_CLOUD_SPACES) {
}

// 安全网络
process.env.UNI_SECURE_NETWORK = isEnableSecureNetwork(manifestJsonObj, process.env.UNI_PLATFORM)
process.env.UNI_SECURE_NETWORK_ENABLE = isEnableSecureNetwork(manifestJsonObj, process.env.UNI_PLATFORM)

// 初始化环境变量
process.env.UNI_CLI_CONTEXT = require('@dcloudio/uni-cli-shared/lib/util').getCLIContext()
Expand Down Expand Up @@ -590,4 +590,4 @@ runByHBuilderX && console.log(uniI18n.__('compiling'))

module.exports = {
manifestPlatformOptions: platformOptions
}
}

0 comments on commit 5cc9106

Please sign in to comment.