Seems like there is no built-in support in TypeScript to automatically minify JavaScript. You have to use external tools like grunt, gulp, npm, uglify to get it minified.
-
You can open an issue and request this featureNitzan Tomer– Nitzan Tomer2017-04-14 18:16:09 +00:00Commented Apr 14, 2017 at 18:16
-
@NitzanTomer first link should be to issue search page :PRyan Cavanaugh– Ryan Cavanaugh2017-04-14 20:24:29 +00:00Commented Apr 14, 2017 at 20:24
-
@RyanCavanaugh Yeah, in retrospective you're right.Nitzan Tomer– Nitzan Tomer2017-04-14 20:27:00 +00:00Commented Apr 14, 2017 at 20:27
1 Answer
There is an issue on GitHub already, issue #8 (from 2014)
Quote from a TypeScript contributor in 2015:
Minification has always been one of our most requested features, and one that we have talked about on and off throughout the past few years. It is a substantial amount of work though, assuming you are not just looking for white space removal, and variable name shortening. Moreover, minification has existed in JavaScript tooling for a long time, and there are already multiple minifiers that plug into existing JS workflows. We have been really busy with ES6 and other language/tooling features for TypeScript which made us shy from taking on such a big problem; specially that TypeScript compiles to JavaScript which allows you to leverage any existing JS tools out there. That said, it is not that we are ignoring the issue; it is still open because we believe that there is problem out there that TypeScript can help solve.
as of today, it's not on the roadmap, with 2.3 as latest planned release (and future in general)