Locking down your API_KEY and why that is important
Too Long; Didn't Read
Using ES6, TypeScript, and webpack, you can create API_KEY as a global constant that can be configured at compile time. This solution would work in any other setting that uses webpack or ES6. The key won't be completely hidden when the app is running, but it can be used in production mode. The solution is simple to set the key for each deployment script to run the app in development mode and production mode, using webpack's HMR (Hot Mode Reload)
Share Your Thoughts