Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compilets — Ultra-Fast TypeScript Compiler for VS Code

Version Installs Rating License

Save a .ts file, get a .js file next to it — instantly. No bundler, no build tool to wire up, no config to write.

📦 v0.2.0 is a complete rewrite from scratch. If you used an earlier version of this extension, please read the Migration Note below — several settings changed shape.


What is this?

Compilets watches your TypeScript files and compiles them to JavaScript the moment you save — using Node.js's own built-in type-stripping and esbuild under the hood, instead of the full TypeScript compiler. That's the entire reason it's fast: it's not running a type checker at all. Type-checking is your editor's job (VS Code already does this live, as you type); Compilets' only job is turning .ts into .js as quickly as possible so you can actually run or debug what you just wrote.

Your tsconfig.json is the single source of truth for how your code compiles. Compilets doesn't ask you to duplicate that configuration anywhere else — it just reads the tsconfig.json you already have.


Why you should use this

  • Zero config to get started. Open a folder with .ts files in it, and Compilets starts watching automatically.
  • Your tsconfig.json already works. sourceMap, outDir, erasableSyntaxOnly, paths aliases — Compilets reads what's already there.
  • No global TypeScript install required. Unlike a lot of "fast compile" setups, there's nothing to npm install -g.
  • Path aliases just work. Import @utils/time.js in your source, and the compiled output gets a real, working relative import — automatically.
  • Built for real projects, not just toy examples. Multi-root workspaces, nested tsconfig.json files, sourcemaps, and diagnostics in the Problems panel are all supported.

🚀 Top Features

Feature What it does
Autostart watch mode If your workspace has .ts files, Compilets starts watching them the moment you open it — no command needed.
tsconfig.json as source of truth Module kind, erasableSyntaxOnly, sourceMap, and paths are all read from your real config.
Path alias rewriting @utils/time.js in your source becomes a correct relative import (../utils/time.js) in the compiled output.
Import Map generation One command detects whether you're building for the browser or Node.js and generates the right output — an HTML <script type="importmap"> or a package.json #imports field.
Sourcemaps Set "sourceMap": true in tsconfig.json and Compilets emits real .js.map files (or inline maps).
Multi-root & nested tsconfig.json support Monorepo-style projects with more than one tsconfig.json are resolved correctly, each independently.
Problems panel integration Compile errors show up as real diagnostics in your file, not just a log line.
Hide compiled .js in Explorer One setting keeps your file tree clean by hiding generated .js files next to their .ts source.

compile-ts extension is lovingly maintained by a solo developer who needs food to survive and keep coding!

<style> img.kofiimg { display: initial !important; vertical-align: middle; height: 13px !important; width: 20px !important; padding-top: 0 !important; padding-bottom: 0 !important; border: none; margin-top: 0; margin-right: 5px !important; margin-left: 0 !important; margin-bottom: 3px !important; content: url('https://storage.ko-fi.com/cdn/cup-border.png') } .kofiimg:after { vertical-align: middle; height: 25px; padding-top: 0; padding-bottom: 0; border: none; margin-top: 0; margin-right: 6px; margin-left: 0; margin-bottom: 4px !important; content: url('https://storage.ko-fi.com/cdn/whitelogo.svg') } .btn-container { display: inline-block !important; white-space: nowrap; min-width: 160px } span.kofitext { color: #fff !important; letter-spacing: -0.15px !important; text-wrap: none; vertical-align: middle; line-height: 45px !important; padding: 0; text-align: center; text-decoration: none !important; text-shadow: 0 1px 1px rgba(34, 34, 34, 0.05); } .kofitext a { color: #fff !important; text-decoration: none !important; } .kofitext a:hover { color: #fff !important; text-decoration: none } a.kofi-button { box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2); line-height: 36px !important; min-width: 150px; display: inline-block !important; background-color: #29abe0; padding: 2px 12px !important; text-align: center !important; border-radius: 7px; color: #fff; cursor: pointer; overflow-wrap: break-word; vertical-align: middle; border: 0 none #fff !important; font-family: 'Quicksand', Helvetica, Century Gothic, sans-serif !important; text-decoration: none; text-shadow: none; font-weight: 700 !important; font-size: 14px !important } a.kofi-button:visited { color: #fff !important; text-decoration: none !important } a.kofi-button:hover { opacity: .85; color: #f5f5f5 !important; text-decoration: none !important } a.kofi-button:active { color: #f5f5f5 !important; text-decoration: none !important } .kofitext img.kofiimg { height: 15px !important; width: 22px !important; display: initial; animation: kofi-wiggle 3s infinite; } @keyframes kofi-wiggle { 0% { transform: rotate(0) scale(1) } 60% { transform: rotate(0) scale(1) } 75% { transform: rotate(0) scale(1.12) } 80% { transform: rotate(0) scale(1.1) } 84% { transform: rotate(-10deg) scale(1.1) } 88% { transform: rotate(10deg) scale(1.1) } 92% { transform: rotate(-10deg) scale(1.1) } 96% { transform: rotate(10deg) scale(1.1) } 100% { transform: rotate(0) scale(1) } } </style> <style> .bmc-btn svg { height: 32px !important; margin-bottom: 0px !important; box-shadow: none !important; border: none !important; vertical-align: middle !important; transform: scale(0.9); flex-shrink: 0; } .bmc-btn { min-width: 210px; color: #000000; background-color: #FFDD00 !important; height: 60px; border-radius: 12px; font-size: 28px; font-weight: Normal; border: none; padding: 0px 24px; line-height: 27px; text-decoration: none !important; display: inline-flex !important; align-items: center; font-family: 'Cookie', cursive !important; -webkit-box-sizing: border-box !important; box-sizing: border-box !important; } .bmc-btn:hover, .bmc-btn:active, .bmc-btn:focus { text-decoration: none !important; cursor: pointer; } .bmc-btn-text { text-align: left; margin-left: 8px; display: inline-block; line-height: 0; width: 100%; flex-shrink: 0; font-family: [FONT] !important; } .logo-outline { fill: #000000; } .logo-coffee { fill: #ffffff; } </style>

How to use

  1. Install the extension and open a folder that contains .ts files.
  2. That's it — if compilets.autoStart is on (the default), watch mode starts automatically and every save recompiles that file.

Commands

Open the Command Palette (F1 or Ctrl+Shift+P / Cmd+Shift+P) and search for Compilets:

Command What it does Keybinding
Compilets: Compile watched TypeScript now Compiles anything that's missing or out of date, without starting the live watcher. Ctrl+Alt+C / Cmd+Option+C
Compilets: Start watch mode (compile on save) Manually starts watching (mainly useful if you've turned off autostart for this workspace). Ctrl+Alt+W / Cmd+Option+W
Compilets: Generate tsconfig.json... Creates a ready-to-go tsconfig.json — choose Node.js or Browser.
Compilets: Generate Import Map Detects your project type and generates the right import map (see below).

Key settings

Setting Default What it's for
compilets.autoStart true Turn off in a workspace's .vscode/settings.json if you'd rather start watching manually.
compilets.config.watchFolders (empty — falls back to tsconfig.json's include, then "src") Which folders to watch.
compilets.compiler.outputLocation "sameFolderAsSource" .js next to its .ts, or in a separate output folder.
compilets.dedicatedOutputFolder "out" Used when outputLocation is "separateFolder".
compilets.hideCompiledJsInExplorer false Keeps generated .js files out of the Explorer view.
                 |

| compilets.importMap.target | "auto" | Force "browser" or "nodejs" if auto-detection ever picks wrong. |

Import Map generation

Run Compilets: Generate Import Map and it figures out what kind of project you have:

  • Browser project (an .html file exists) — writes/updates a <script type="importmap"> block in your currently open HTML file, or index.html, plus an importmap.json.
  • Node.js project (package.json exists, no .html) — writes your tsconfig.json path aliases into package.json's imports field (e.g. @utils/* becomes #utils/*, as Node requires).
  • Chrome extension (manifest.json found) — Compilets won't generate an import map here on purpose. Manifest V3's security policy blocks inline import maps in extension pages, so one would just fail silently. Your internal @alias imports are still rewritten to plain relative paths automatically, which works fine in extensions.

🎬 Video Tour

This tour is split into five short videos, each covering one part of the extension:

  1. Install & your first compile — the zero-config happy path. 🎥 Video coming soon — link will be added here.
  2. Watch mode & autostart — what happens automatically, and how to control it. 🎥 Video coming soon — link will be added here.
  3. tsconfig.json as the source of truth — sourceMap, outDir, erasableSyntaxOnly, and path aliases. 🎥 Video coming soon — link will be added here.
  4. Import Map generation — browser vs. Node.js, walked through end to end. 🎥 Video coming soon — link will be added here.
  5. Settings deep-dive — outputLocation, hideCompiledJsInExplorer, and the rest. 🎥 Video coming soon — link will be added here.

⚠️ Limitations

  • .tsx is not supported. Compilets is built for plain TypeScript compilation, not JSX/React-style workflows. If you need .tsx (or support for another UI framework's file type), please 👍 the existing request on GitHub if there is one, or open a new issue if there isn't — feature interest is tracked there, not guessed at.

If anything doesn't work the way this README says it should, please open an issue rather than suffer in silence. Reports are genuinely useful, even small ones.


What's new in 0.2.0

Version 0.2.0 is a from-scratch rewrite, not an incremental update. Here's the shape of what changed:

0.1.x 0.2.0
Compile engine Requires a global npm i -g typescript install Node's built-in type-stripping + esbuild — no global install needed
Config source Extension settings (module, jsx, etc.) Your real tsconfig.json, settings only fill gaps tsconfig can't express
Start on save Manual "watch mode" command required Autostart if the workspace has .ts files
Incremental compile Broken — recompiled everything, every time Fixed — only stale files recompile
Path aliases (@utils/*) Not supported Rewritten automatically to working relative imports
Sourcemaps Not supported Full support, reading tsconfig.json directly
Multi-root workspaces Not supported Supported, including nested tsconfig.json files
Compile errors Output channel only Also shown as Problems panel diagnostics
Import maps Not supported New: browser and Node.js import map generation
JSX/.tsx Partially attempted, broken Not supported (see Limitations)

🔄 Migration note (coming from 0.1.x)

If you have existing compilets.* settings from a previous version, they've been replaced:

Old setting (0.1.x) What to do now
compilets.config.module Remove it — set compilerOptions.module in your tsconfig.json instead.
compilets.config.jsx Remove it — JSX isn't supported in 0.2.0.
compilets.config.rootDirectory Replace with compilets.config.watchFolders (or just delete it — it now falls back to tsconfig.json's include, then "src").
compilets.config.outDirectory Replace with compilets.dedicatedOutputFolder, or just set compilerOptions.outDir in tsconfig.json.
compilets.custom.runCompileCommand / runWatchCommand Removed entirely — no replacement.

Old settings left in place are simply ignored by 0.2.0, not read. If compiled output looks different than you expect after updating, check your tsconfig.json first — it's now the thing actually in charge.


Related extensions from the same author

If Compilets isn't quite the right tool for your specific workflow, these might be:

  • crx-hmr — need TypeScript compiling with hot-reload support for your Chrome extension? crx-hmr builds that HMR workflow on top of the same automatic TypeScript compiling — save a .ts file, get a .js file, and your extension reloads automatically. The only real difference from Compilets is that one feature: hot-reload.
  • vsx-hmr — building a VS Code extension with a webview? vsx-hmr is an npm package (not a VS Code extension) that gives your webview the same hot-reload experience during development.

License

GPL-3.0-only. Free, and will stay free.

Found a bug, or something confusing in this README? Open an issue

About

Ultra fast typescript compiler. Speedup typescript Compile time. Save valuable time while debug typescript

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages