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
My project add network request, But I need different environment variables control the request address, how should I use env in vite
Env Variables
None
I want to be able to access import.meta.env.BASE_URL, just like the vite project
import.meta.env.BASE_URL
System: OS: Windows 11 10.0.22631 CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12600KF Memory: 2.31 GB / 31.82 GB Binaries: Node: 18.19.0 - D:\software\nodejs\node.EXE npm: 10.2.3 - D:\software\nodejs\npm.CMD pnpm: 9.1.1 - ~\AppData\Local\pnpm\pnpm.CMD bun: 1.1.3 - ~\.bun\bin\bun.EXE Browsers: Edge: Chromium (123.0.2420.97) Internet Explorer: 11.0.22621.3527 npmPackages: vitepress: 1.0.2 => 1.0.2
No response
The text was updated successfully, but these errors were encountered:
import.meta.env.BASE_URL should work fine in client. Please share minimal reproducible example using https://vitepress.new
Sorry, something went wrong.
I solved it! I should put the env file to docs folder
No branches or pull requests
Describe the bug
My project add network request, But I need different environment variables control the request address, how should I use env in vite
Env Variables
Reproduction
None
Expected behavior
I want to be able to access
import.meta.env.BASE_URL
, just like the vite projectSystem Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: