codesandbox / codesandbox/codesandbox-client
Why 'process.env' don't work when packaging
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13.6k
- Forks
- 2.4k
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 2
Description
When I execute yarn build:sandpack
the value in process.env is always empty and the global variables .env do not work at all.
Is there something wrong with my execution?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with yarn build:sandpack and compare the packaged result with the expected process.env and .env behavior shown in the report. The issue does not name a file or test, so first locate the Sandpack build entry point and identify how environment values are handled; done when the expected environment behavior is confirmed and covered by an appropriate check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100