Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>TSCompileOnSaveNew to Visual Studio Code? Get it now.
TSCompileOnSave

TSCompileOnSave

Mitch Mommers

|
1,832 installs
| (0) | Free
Auto compile Typescript on saving a file
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

EXPIREMENTAL: Compile TS on save

This plugin allows you to compile ts on save using existing configuration.

Feel free to follow for updates!

How does it work

When you save it will loop back in your project structure to find a tsconfig and run tsc on that location which will be the first tsconfig it finds from your current working file up to your root folder.

This is ideal when working with a project that uses yarn workspaces or lerna. Especially when you use multiple modules that depend on each other and have frequent changes.

You can also manually trigger it by using the build command.

How to configure

By default the plugin is disabled to get it working you must configure 2 things:

1. make sure you have a workspace!

This plugin requires that you use a workspace to a .vscode folder with a settings.json is a must.

2. Contents of the settings.json

{
    "tsCompileOnSave.enabled": true, # to enable the plugin
    "tsCompileOnSave.prefixes": [ # add glob patterns for you packages
        "packages/lib/**/src/**"
    ]
}

That's it happy coding!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft