Angular teams struggle to keep development-only code out of production
Angular developers want development checks and tools—such as Redux DevTools—to disappear from production bundles. They report that `isDevMode()` does not enable the dead-code removal they need, while relying on the internal `ngDevMode` flag feels risky because it is not a public API. Swapping files at build time is a workaround, but developers describe it as convoluted and error-prone.
For angular application developers. Mentioned from May 2018 to Jul 2023 on GitHub.
3 different people described this problem in 2 separate discussions.
- Indie fit
- 2.0/10
- Pain
- 6.0/10
- Frequency
- 5.0/10
- Willingness to pay
- 0.0/10
- Momentum
- 5.0/10
- Who pays
- Professionals
- Competition
- Medium
- Build difficulty
- Medium
What people said
Quoted word for word. Follow a link to read the whole discussion.
Yes, we're using the isDevMode function, but we would like to eliminate "dead" code from the production bundle which is possible with ngDevMode
Currently, we can use ngDevMode to remove dev mode-related logic from the production bundle in the following way: However, this global variable is not part of the public API and it can be risky to rely on it
Build brief
See what to build and who will buy it
- 1 product idea with the smallest useful version and pricing
- 4 places to find your first customers
- 2 more quotes from people who have this problem
- Current workarounds, existing solutions and risks