-->

Visual Studio可以不JavaScript的输出合并成一个文件。 有我,我需要做更多的

2019-10-21 23:16发布

我设置建造之前的设置就像上面图片。 我不知道我应该怎么做额外的操作,以完成所有的.ts文件合并成一个单一的.js文件。

Answer 1:

如果使用VS2015 RTM版本,事实证明,他们分手了。

你需要把这里全路径名,直到他们解决它。

VS2015打字稿编译成单个文件的保存不工作

给予好评这样的 : https://connect.microsoft.com/VisualStudio/feedback/details/1581065/typescript-compile-output-into-single-file-not-working-on-save



Answer 2:

模块系统设置为none ,并确保你没有使用external modules 。 这些不工作--out的时刻。

区别: https://www.youtube.com/watch?v=KDrWLMUY0R0&hd=1

如果你想从CommonJS的模块,一个单一的文件,你需要使用类似的WebPack或browserify。 TS不会做到这一点: https://github.com/Microsoft/TypeScript/issues/17



文章来源: Visual Studio can not combine JavaScript output into one file. Is there any adjustment am I needed to do more?