相关疑难解决方法(0)

如何在 vite.config.js 中使用 Vite 环境变量?

.env在我的 Vite 项目中使用以下内容:

# To prevent accidentally leaking env variables to the client, only
# variables prefixed with VITE_ are exposed to your Vite-processed code

VITE_NAME=Wheatgrass
VITE_PORT=8080
Run Code Online (Sandbox Code Playgroud)

我怎样才能VITE_PORT在我的vite.config.js?

vuejs3 vite

6
推荐指数
4
解决办法
4536
查看次数

标签 统计

vite ×1

vuejs3 ×1