

English
There are three main ways to configure environment variables in uni-app project:
The webpack configuration can be modified in vue.config.js, including environment variables. For details, please refer to vue-config.js.
When customizing the conditional compilation platform, you can configure environment variables under the env node of the package.json file. For details, please refer to package.json
In the project created by CLI, you can place a .env
file in the root directory to specify environment variables. For details, please refer to: Environment Variables (opens new window).