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

是否可以使用 cross-env 来解决 window 平台的问题 #8

Closed
yydounai1234 opened this issue Mar 2, 2023 · 1 comment
Closed

Comments

@yydounai1234
Copy link
Collaborator

"dev": "VITE_APP_BUILD_TIME=$(date +%s) VITE_APP_LATEST_COMMIT_HASH=$(git rev-parse --short HEAD) vite",
"build": "VITE_APP_BUILD_TIME=$(date +%s) VITE_APP_LATEST_COMMIT_HASH=$(git rev-parse --short HEAD) tsc && vite build",
"preview": "VITE_APP_BUILD_TIME=$(date +%s) VITE_APP_LATEST_COMMIT_HASH=$(git rev-parse --short HEAD) vite preview"

@ryuujo1573
Copy link
Owner

使用 pnpm + pwsh + cross-env 在 Windows 环境下会出现失去响应的问题;
临时排查后可以通过使用 bash 并设置 pnpm 解决

pnpm config set script-shell "C:\\Program Files\\Git\\bin\\bash.exe"
补充信息

kentcdodds/cross-env#192 (comment)
这部分环境变量的设置在 GitHub Pages 上构建时有问题,后续尝试通过其他方式传递构建时间的元信息

@ryuujo1573 ryuujo1573 moved this to Todo in qnrtc-web-demo Mar 2, 2023
@ryuujo1573 ryuujo1573 moved this from Todo to Won't Fix in qnrtc-web-demo Mar 29, 2023
@ryuujo1573 ryuujo1573 closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2023
@github-project-automation github-project-automation bot moved this from Won't Fix to Done in qnrtc-web-demo May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants