当前位置:网站首页>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

边栏推荐
- How to solve the component conflicts caused by scrollbars in GridView
- MySQL的information_schema数据库
- Practical gadget instructions
- Fast power (template)
- Average two numbers
- How to choose the middle-aged crisis of the testing post? Stick to it or find another way out? See below
- The solution of win11 taskbar right click without Task Manager - add win11 taskbar right click function
- MySQL information_ Schema database
- 509. Fibonacci number, all paths of climbing stairs, minimum cost of climbing stairs
- ORICO ORICO outdoor power experience, lightweight and portable, the most convenient office charging station
猜你喜欢

Overview of convolutional neural network structure optimization

JSON web token -- comparison between JWT and traditional session login authentication

JS flattened array of number shape structure

MySQL installation and configuration

27-31. Dependency transitivity, principle

After the festival, a large number of people change careers. Is it still time to be 30? Listen to the experience of the past people

Json Web token - jwt vs. Traditional session login Authentication

Detectron: train your own data set -- convert your own data format to coco format

R统计绘图-随机森林分类分析及物种丰度差异检验组合图

Reading notes of Clickhouse principle analysis and Application Practice (4)
随机推荐
509. 斐波那契数、爬楼梯所有路径、爬楼梯最小花费
webrtc 快速搭建 视频通话 视频会议
Impact relay jc-7/11/dc110v
[March 3, 2019] MAC starts redis
509. Fibonacci number, all paths of climbing stairs, minimum cost of climbing stairs
Learn about the Internet of things protocol WiFi ZigBee Bluetooth, etc. --- WiFi and WiFi protocols start from WiFi. What do we need to know about WiFi protocol itself?
AWT common components, FileDialog file selection box
实用的小工具指令
27-31. Dependency transitivity, principle
JS execution mechanism
R statistical mapping - random forest classification analysis and species abundance difference test combination diagram
体验碎周报第 102 期(2022.7.4)
Internet of things protocol ZigBee ZigBee module uses the concept of protocol stack
每周小结(*63):关于正能量
Webrtc quickly set up video call and video conference
Design and implementation of redis 7.0 multi part AOF
APScheduler如何设置任务不并发(即第一个任务执行完再执行下一个)?
Learning multi-level structural information for small organ segmentation
Sort list tool class, which can sort strings
剑指 Offer II 038. 每日温度