No more env: browser?
See original GitHub issueDid something change recently in the env
configuration?
I just updated to the latest version in one project and I’m getting a lot of error 'document' is not defined no-undef
.
This is resolved when I manually set the “browser” env in my config but I wonder why it’s not done automatically here instead, like it used to be.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Gatsby, Environment variables not accessible in browser
According to the docs, Gatsby's default support enables putting env variables into the browser, while the dotenv method allows getting env ...
Read more >Environment Variable visible in browser - Netlify Support Forums
I want to use netlify, so that I can deploy my app, without the keys being visible on the front end. While deploying,...
Read more >Basic Features: Environment Variables - Next.js
Learn to add and access environment variables in your Next.js application. ... Expose environment variables to the browser by prefixing with NEXT_PUBLIC_ ...
Read more >Environment Variables in Apache
The most basic way to set an environment variable in Apache is using the unconditional SetEnv directive. Variables may also be passed from...
Read more >Env Variables and Modes - Vite
For example, dynamic key access like import.meta.env[key] will not work. ... While you can define more custom env variables in .env.[mode] files, you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Our React runs in both the browser and node, and our app sets both envs to true in its top-level config.
The top-level app is the only thing that truly knows its own environment - node, browser, tests, amd, etc.
I’m not opposed to adding it back, but the more I think about it, the more I think it’s not a shareable config’s job to set them.
Agreed. Thanks 😃