Converts typescript to javascript and minify's the code on the fly.
Installation
To install the package run the following
npm install ts-middleware
Usage
This is the most basic way to run the middleware
const tsm = appapp
Note: In your tsconfig.json
file you must have either outDir
or outFile
set in your compilerOptions
.
There are three ways to call the middleware:
The first way uses all the default settings, which will compress and mangle the javascript.
app
The second way is to customize the middleware by adding custom uglification settings, or disabling it alltogether.
app
The final, and third way is if you have mutliple projects that you want to build. Pass in an array of settings similar to the above.
app
To see all the uglify settings visit uglify-es