Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove Typescript assert when using npm run build?

What is the best way to remove Typescript asserts so that a production build created using npm run build is assert free?

Thank you

like image 300
Olivierwa Avatar asked Jun 28 '26 20:06

Olivierwa


1 Answers

The fastest solution I know is to use assert-plus on your project.

You can easily deactivate assertion according to your environment (production, development,..).

like image 99
Guillaume Tremeau Avatar answered Jul 01 '26 12:07

Guillaume Tremeau