This content originally appeared on Krasimir Tsonev - blog and was authored by Krasimir Tsonev - blog
If you are building some sort of an app, Babel is probably part of your build system. It is that thing which converts our fancy code to valid, working in a browser, JavaScript. Just recently at work I had to design a solution that swaps a class based on the environment. Or in another words, we have logic that should not reach our users. The file should be available locally and on our staging environment but not in production. A tiny Babel plugin was the cheapest solution for me so I decided to share the result.
This content originally appeared on Krasimir Tsonev - blog and was authored by Krasimir Tsonev - blog
Krasimir Tsonev - blog | Sciencx (2021-02-07T21:52:56+00:00) Replacing code for production with Babel transformation. Retrieved from https://www.scien.cx/2021/02/07/replacing-code-for-production-with-babel-transformation/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.