I can't get Compile-on-Save to work with VS2013. I installed VS2013, reinstalled TS 0.9.0.1, and under "Tools", "Options", Typescript/Project/General, I've checked both of the "Compile on save" options. But when I add a new TS file to my project, and then edit it and save it, the changes aren't reflected in the associated .js file.
Am I doing something wrong? Is anybody else having this problem?
To Enable Compile on save feature, we first need to create the Typescript Configuration file tsconfig. json . The tsconfig. json is the file where TypeScript Compiler looks for project configuration and compiler options.
Another way of automating the TypeScript compilation is by using command line interface or the Command Prompt. The second way is pretty simple to achieve; we just need to write a single line to watch any changes in our TypeScript file.
For example, for TypeScript 3.6. 0, you would use npm install --save-dev [email protected] . To preview the next version of TypeScript, run npm install --save-dev typescript@next .
This solved the problem for me:
- Go to Options under the Tools menu.
- Expand options for Text Editor
- Expand options for TypeScript
- Expand options for Project
- Check “Automatically compile TypeScript file which are not part of the project”
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With