We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
把参数改成函数就可以获取到当前的"mode".
import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' export default defineConfig(({mode}) => { return { publicDir:'production' === mode ? './' : '/', plugins: [vue()] } })
通过"loadEnv "还可以获取到.env文件中的信息
import { loadEnv } from 'vite' loadEnv(mode,process.cwd());
The text was updated successfully, but these errors were encountered:
No branches or pull requests
把参数改成函数就可以获取到当前的"mode".
通过"loadEnv "还可以获取到.env文件中的信息
The text was updated successfully, but these errors were encountered: