Visual Studio TypeScript Options

前端 未结 3 1351
挽巷
挽巷 2020-12-15 06:35

How do I tell the TypeScript compiler to generate amd modules (--module amd) from within Visual Studio.

Thanks.

3条回答
  •  执笔经年
    2020-12-15 07:09

    In your project file you will need to change the MSBuild target that is building TypeScript files. If you are using the default template for "HTML Application built with TypeScript", unload your project, edit the project file, you will find a target called "BeforeBuild" that is calling the compiler at "$(PROGRAMFILES)\Microsoft SDKs\TypeScript\0.8.0.0\tsc", add --module amd to it; save and reload your project. next time you build you should see the command argument passed correctly to the compiler.

提交回复
热议问题