1

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.

3
  • You can open an issue and request this feature Commented Apr 14, 2017 at 18:16
  • @NitzanTomer first link should be to issue search page :P Commented Apr 14, 2017 at 20:24
  • @RyanCavanaugh Yeah, in retrospective you're right. Commented Apr 14, 2017 at 20:27

1 Answer 1

2

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)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.