当前位置:网站首页>Variables d'environnement personnalisées uniapp
Variables d'environnement personnalisées uniapp
2022-07-04 06:23:00 【Voyageur spatio - temporel】
1、Créer sous le Répertoire racine package.json Documentation,Écrivez ce qui suit,Voir le site Web pour les éléments de configuration spécifiques package.json
{
"uni-app": {
"scripts": {
"dev": {
// Nom de l'élément de configuration
"title":"h5Environnement d'essai", // Nom dans la barre d'outils du menu
"env": {
"UNI_PLATFORM": "h5" // Plate - forme
},
"define": {
"H5-DEV": true // Nom de la variable
}
},
"prod": {
"title":"h5Environnement de production",
"env": {
"UNI_PLATFORM": "h5"
},
"define": {
"H5-PROD": true
}
}
}
}
}
2、Utilisation de variables d'environnement
// #ifdef H5-DEV
console.log('dev')
// #endif
// #ifdef H5-PROD
console.log('prod')
// #endif
3、Compiler l'emballage
边栏推荐
- 70000 words of detailed explanation of the whole process of pad openvino [CPU] - from environment configuration to model deployment
- Reading notes of Clickhouse principle analysis and Application Practice (4)
- buuctf-pwn write-ups (8)
- Understanding of cross domain and how to solve cross domain problems
- Fast power (template)
- C语言中的排序,实现从小到大的数字排序法
- 2022.7.2-----leetcode. eight hundred and seventy-one
- Functions in C language (detailed explanation)
- R statistical mapping - random forest classification analysis and species abundance difference test combination diagram
- STC8H开发(十二): I2C驱动AT24C08,AT24C32系列EEPROM存储
猜你喜欢
How to choose the middle-aged crisis of the testing post? Stick to it or find another way out? See below
雲原生——上雲必讀之SSH篇(常用於遠程登錄雲服務器)
【微服务】Nacos集群搭建以及加载文件配置
Experience weekly report no. 102 (July 4, 2022)
High performance parallel programming and optimization | lesson 02 homework at home
InputStream/OutputStream(文件的输入输出)
实用的小工具指令
Arcpy uses the updatelayer function to change the symbol system of the layer
配置交叉编译工具链和环境变量
R统计绘图-随机森林分类分析及物种丰度差异检验组合图
随机推荐
Common JS tool Libraries
Weekly summary (*63): about positive energy
[microservice] Nacos cluster building and loading file configuration
《ClickHouse原理解析与应用实践》读书笔记(4)
MySQL learning notes 3 - JDBC
C语言中的排序,实现从小到大的数字排序法
云原生——上云必读之SSH篇(常用于远程登录云服务器)
注释与注解
Install pytoch geometric
17-18. Dependency scope and life cycle plug-ins
MySQL installation and configuration
Invalid bound statement (not found): com. example. mapper. TblUserRecordMapper. login
如何实现视频平台会员多账号登录
Tree DP
复合非线性反馈控制(二)
Manually page the list (parameter list, current page, page size)
px em rem的区别
实用的小工具指令
27-31. Dependency transitivity, principle
Configure cross compilation tool chain and environment variables