AST fun. Remove a function call from your bundle

I’m working on a small library that has a logger. I’m bundling the app to a single file and I want to disable the logger for the production version. In this blog post we will see how I removed the logger.log calls from my bundle using AST (abstract syntax tree).


This content originally appeared on Krasimir Tsonev - blog and was authored by Krasimir Tsonev - blog

I'm working on a small library that has a logger. I'm bundling the app to a single file and I want to disable the logger for the production version. In this blog post we will see how I removed the logger.log calls from my bundle using AST (abstract syntax tree).


This content originally appeared on Krasimir Tsonev - blog and was authored by Krasimir Tsonev - blog


Print Share Comment Cite Upload Translate
APA
Krasimir Tsonev - blog | Sciencx (2023-12-06T05:27:10+00:00) » AST fun. Remove a function call from your bundle. Retrieved from https://www.scien.cx/2021/02/07/ast-fun-remove-a-function-call-from-your-bundle/.
MLA
" » AST fun. Remove a function call from your bundle." Krasimir Tsonev - blog | Sciencx - Sunday February 7, 2021, https://www.scien.cx/2021/02/07/ast-fun-remove-a-function-call-from-your-bundle/
HARVARD
Krasimir Tsonev - blog | Sciencx Sunday February 7, 2021 » AST fun. Remove a function call from your bundle., viewed 2023-12-06T05:27:10+00:00,<https://www.scien.cx/2021/02/07/ast-fun-remove-a-function-call-from-your-bundle/>
VANCOUVER
Krasimir Tsonev - blog | Sciencx - » AST fun. Remove a function call from your bundle. [Internet]. [Accessed 2023-12-06T05:27:10+00:00]. Available from: https://www.scien.cx/2021/02/07/ast-fun-remove-a-function-call-from-your-bundle/
CHICAGO
" » AST fun. Remove a function call from your bundle." Krasimir Tsonev - blog | Sciencx - Accessed 2023-12-06T05:27:10+00:00. https://www.scien.cx/2021/02/07/ast-fun-remove-a-function-call-from-your-bundle/
IEEE
" » AST fun. Remove a function call from your bundle." Krasimir Tsonev - blog | Sciencx [Online]. Available: https://www.scien.cx/2021/02/07/ast-fun-remove-a-function-call-from-your-bundle/. [Accessed: 2023-12-06T05:27:10+00:00]
rf:citation
» AST fun. Remove a function call from your bundle | Krasimir Tsonev - blog | Sciencx | https://www.scien.cx/2021/02/07/ast-fun-remove-a-function-call-from-your-bundle/ | 2023-12-06T05:27:10+00:00
https://github.com/addpipe/simple-recorderjs-demo