You can configure the uni-app compiler through the following entry:

manifest.json

In manifest.json, you can configure the version of Vue (Vue2/Vue3), as well as the routing mode of the release H5 platform, see: manifest.json

vue.config.js

In vue.config.js, you can modify the webpack configuration, including environment variables, please refer to vue-config.js.

vite.config.js

Vite configuration, including environment variables, can be modified in vite.config.js, please refer to vite.config.js.

package.json

When customizing the conditional compilation platform, you can configure environment variables under the env node of the package.json file. For details, refer to package.json

.env

In a project created by CLI, you can place a .env file in the root directory to specify environment variables. For details, refer to: [Environment Variables](https://cli.vuejs.org/zh/guide/mode-and-env .html#%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F).

On This Page