A few tips for people who land here:
- Make sure your
.envfiles are in the project root folder (and not in saysrc/) - Variable names should start with
VUE_APP_if to be statically embedded into the client bundle - Restart the dev server or build your project for changes to take effect
- If you are migrating from a webpack based solution make sure that you replace
:(from JSON config) with=(dotenv format). Easy to miss - Make sure you’ve saved any changes to your
.envfiles. - In old Vue versions environment variables were defined in e.g.
config/dev.env.jsinstead of the.envfiles in root