.env.production not applied
See original GitHub issueAfter updating from craco 3.6.0 to 4.0.0, I noticed the PUBLIC_URL env variable ( set in .env.production ) is not applied anymore (although there’s a message at the end of the build indicating the correct one => The project was built assuming it is hosted at /PUBLIC_URL
).
The issue is quite similar to this one : https://github.com/sharegate/craco/issues/58.
I tried to look at the commits between 3.6.0 & 4.0.0 but couldn’t find where the problem comes from 😕
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
env.production not working · Issue #2676 · vitejs/vite - GitHub
Hello,. I have two .env files .env.production with. APP_ENV=production. ASSET_URL=/wp-content/themes/innervite2/dist/. and .env.local with
Read more >create react app not picking up .env files? - Stack Overflow
I have added two .env files .env.development and .env.production in the root. My .env.development includes:
Read more >Using environment variables with Webpack - Prateek Surana
A guide for setting up and using environment variables with Webpack and handling different values for Production and Development ...
Read more >Environment Variables - Gatsby
In development, Gatsby will load environment variables from a file named .env.development . For builds, it will load from .env.production . A .env...
Read more >Node Emulation - Parcel
The NODE_ENV environment variable is automatically set by Parcel depending on the mode. When running parcel build , NODE_ENV is set to production...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fix with 5.2: https://www.npmjs.com/package/@craco/craco/v/5.2.0
Hi @LentnerStefan
Thank you for reporting the problem.
I am also surprised that the changes affect this. I will have a look soon.
Patrick