是否可以将 TypeScript 编译为缩小代码? [英] Is it possible to compile TypeScript into minified code?

查看:32
本文介绍了是否可以将 TypeScript 编译为缩小代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以选择将 TypeScript 代码的输出编译为缩小版?还是让我们在一个单独的流程中处理这个问题?混淆会影响答案吗?

Is there an option to compile TypeScript code's output as minified? Or are we left to deal with that in a separate process? And does obfuscation affect the answer?

推荐答案

TypeScript 编译器不支持生成缩小或混淆代码.您将需要针对编译器的 JavaScript 输出使用另一个工具.

The TypeScript compiler does not support the generation of minifies or obfuscated code. you will need to use another tool against the JavaScript output of the compiler.

有一个开放的功能请求:microsoft/TypeScript#8

There's an open feature request: microsoft/TypeScript#8

这篇关于是否可以将 TypeScript 编译为缩小代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆