-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Describe the bug
I have a .env file looks like this:
APP_SIGN_SALT="PICUE#3$LCDG56h$LBNOD3*1H6ER4Y#DN12G6Z3J"
But in my app, the env variable became this:
console.log(import.meta.env.APP_SIGN_SALT); // =>PICUE#3*1H6ER4Y#DN12G6Z3J
In dotenv@16.0.3, the env variable is correct:
require('dotenv').config();
console.log(process.env.APP_SIGN_SALT); // => PICUE#3$LCDG56h$LBNOD3*1H6ER4Y#DN12G6Z3J
Reproduction
https://stackblitz.com/edit/vitejs-vite-j9ece2?file=src/App.vue
Steps to reproduce
No response
System Info
System:
OS: macOS 12.3.1
CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
Memory: 779.70 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
Yarn: 1.22.15 - ~/.nvm/versions/node/v16.13.1/bin/yarn
npm: 8.5.5 - ~/.nvm/versions/node/v16.13.1/bin/npm
Browsers:
Chrome: 106.0.5249.103
Firefox Developer Edition: 106.0
Safari: 15.4
Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation