Skip to content
New issue

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

Add dotenv and unify define into vite.config as merging doesn't work #179

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brauliobo
Copy link

This PR adds and configures dotenv as an useful way of loading environment variables.

It is makes the access of all process.env keys feasible and remove a hack to the NODE_ENV var.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this project is using pnpm as package manager

@@ -30,6 +30,9 @@
"postinstall": "simple-git-hooks",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"dotenv": "^16.4.5"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move it to devDependencies

__NAME__: JSON.stringify(packageJson.name),
'__DEV__': isDev,
'__NAME__': JSON.stringify(packageJson.name),
'process.env': process.env,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's unsafe to inject all process env into the building process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants