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

在 ice.config.mts 中无法读取 .env 中的环境变量 #5637

Closed
luhc228 opened this issue Nov 29, 2022 · 2 comments
Closed

在 ice.config.mts 中无法读取 .env 中的环境变量 #5637

luhc228 opened this issue Nov 29, 2022 · 2 comments
Assignees

Comments

@luhc228
Copy link
Collaborator

luhc228 commented Nov 29, 2022

// .env.production
test=123
// ice.config.mts
export default defineConfig(() => {
  console.log('test env', typeof process.env.test, process.env.test) // undefined
})
@wssgcg1213
Copy link
Collaborator

时序问题?

@luhc228
Copy link
Collaborator Author

luhc228 commented Nov 30, 2022

时序问题?

Yes

@ClarkXia ClarkXia self-assigned this Dec 1, 2022
@ClarkXia ClarkXia closed this as completed Dec 8, 2022
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

No branches or pull requests

3 participants