BLITZ_PUBLIC_ prefix does not expose env to client
odi89 opened this issue · comments
What is the problem?
Hello
Using BLITZ_PUBLIC_-prefix does not expose the environment variables to the client
Prefix with NEXT_PUBLIC_-prefix does work!
Just a headsup=)
Paste all your error logs here:
PASTE_HERE (leave the ``` marks)
Paste all relevant code snippets here:
PASTE_HERE (leave the ``` marks)
What are detailed steps to reproduce this?
- Set ENV vironment
BLITZ_PUBLIC_ENVIRONMENT="local"
console.log(process.env.BLITZ_PUBLIC_ENVIRONMENT) --> undefined
Run blitz -v
and paste the output here:
Blitz version: 2.0.0-beta.17 (global)
Blitz version: 2.0.5 (local)
macOS | darwin-arm64 | Node: v20.9.0
Package manager: npm
System:
OS: macOS 14.2.1
CPU: (10) arm64 Apple M1 Pro
Memory: 2.24 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
Yarn: Not Found
npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
npmPackages:
@blitzjs/auth: ^2.0.0 => 2.0.2
@blitzjs/next: ^2.0.0 => 2.0.2
@blitzjs/rpc: ^2.0.0 => 2.0.2
@prisma/client: 5.6.0 => 5.6.0
blitz: ^2.0.0 => 2.0.5
next: 13.5.6 => 13.5.6
prisma: 5.6.0 => 5.6.0
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
typescript: 5.1.6 => 5.1.6
Please include below any other applicable logs and screenshots that show your problem:
No response
hey @odi89, thanks for the issue! This functionality was part of the legacy blitz version <=0.45. In blitz versions > 2.0.0 you can use NEXT_PUBLIC_ for the same functionality thanks!
Thank you for you answer🔥
Blitz is awesome!