{"id":26964375,"url":"https://github.com/septh/rollup-plugin-fast-typescript","last_synced_at":"2026-02-09T21:33:00.465Z","repository":{"id":238056154,"uuid":"795778188","full_name":"Septh/rollup-plugin-fast-typescript","owner":"Septh","description":"A Rollup plugin that uses esbuild, swc or sucrase (you decide!) for blazing fast TypeScript transpilation.","archived":false,"fork":false,"pushed_at":"2025-02-22T17:22:33.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T12:45:22.766Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Septh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":"Septh","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://paypal.me/septh07"]}},"created_at":"2024-05-04T03:17:01.000Z","updated_at":"2025-02-22T17:22:30.000Z","dependencies_parsed_at":"2024-09-16T21:59:02.439Z","dependency_job_id":"0fdba97e-ec8e-4abc-a54c-d40384ad0342","html_url":"https://github.com/Septh/rollup-plugin-fast-typescript","commit_stats":null,"previous_names":["septh/rollup-plugin-fast-typescript"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Septh/rollup-plugin-fast-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septh%2Frollup-plugin-fast-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septh%2Frollup-plugin-fast-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septh%2Frollup-plugin-fast-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septh%2Frollup-plugin-fast-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Septh","download_url":"https://codeload.github.com/Septh/rollup-plugin-fast-typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septh%2Frollup-plugin-fast-typescript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265571146,"owners_count":23790026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-03T06:30:47.627Z","updated_at":"2026-02-09T21:32:55.444Z","avatar_url":"https://github.com/Septh.png","language":"TypeScript","funding_links":["https://patreon.com/Septh","https://paypal.me/septh07"],"categories":[],"sub_categories":[],"readme":"# rollup-plugin-fast-typescript\nA plugin that uses esbuild, swc or Sucrase (you decide!) for blazing fast TypeScript transpilation.\n\n\u003e- This plugin requires Rollup version 4.0.0 or higher.\n\u003e- This package is ESM-only and can only be used from an ESM configuration file (either `rollup.config.mjs` or `rollup.config.js` with `type=\"module\"` in `package.json`. See [Rollup docs](https://rollupjs.org/guide/en/#configuration-files) for more detail).\n\n## Features\n- You choose which one of the three supported transpilers to use.\n- Zero config: your project's `tsconfig.json` is all you need.\n- Uses TypeScript API for full `tsconfig.json` compatibility:\n  - `tsconfig.json#extends`:\n    - Supports extending configs from npm packages, e.g., [@tsconfig/base](https://github.com/tsconfig/bases).\n    - In watch mode, all files in the config chain are watched and trigger a rebuild if modified.\n  - Full TypeScript-like module resolution, including `compilerOptions#baseUrl`, `compilerOptions#paths`, `compilerOptions#rootDirs` and even `compilerOptions#moduleSuffixes`!\n- No hidden \"magic\" that happens behind your back.\n\n## Installation\nUse your favorite package manager. Mine is [npm](https://www.npmjs.com).\n\nYou must also make sure that the transpiler you plan to use is installed - the plugin does not install it for you.\n\nFor esbuild:\n```sh\nnpm install --save-dev rollup-plugin-fast-typescript esbuild\n```\n\nFor swc:\n```sh\nnpm install --save-dev rollup-plugin-fast-typescript @swc/core\n```\n\nFor Sucrase:\n```sh\nnpm install --save-dev rollup-plugin-fast-typescript sucrase\n```\n\n## Usage\nThe simpler, the better.\n\n```js\n// rollup.config.js\nimport fastTypescript from 'rollup-plugin-fast-typescript'\n\nexport default {\n  ...\n  plugins: [\n    fastTypescript('esbuild') // or 'swc' or 'sucrase'\n  ]\n}\n```\n\nThis will load your project's `tsconfig.json` and use the specified transformer to transpile your code to Javascript.\n\nStarting with version 2.1.0, the plugin also exports these three convenience functions:\n\n* `esbuild(tsconfig)` is an alias for `fastTypescript('esbuild', tsconfig)`\n* `swc(tsconfig)` is an alias for `fastTypescript('swc', tsconfig)`\n* `sucrase(tsconfig)` is an alias for `fastTypescript('sucrase', tsconfig)`\n\nFor example:\n```js\n// rollup.config.js\nimport { swc } from 'rollup-plugin-fast-typescript'\n\nexport default {\n  ...\n  plugins: [\n    swc()   // Use swc to transpile TypeScript\n  ]\n}\n```\n\n## Options\n`rollup-plugin-fast-typescript`'s *parti pris* is to mimic the behavior of the real TypeScript compiler as closely as possible (two obvious exceptions here are type checking and declaration files generation, since none of the supported transpilers support these features), so the plugin doest not offer any option to play with other than the choice of the transpiler to use and the `tsconfig.json` settings to use.\n\n```js\nfastTypescript(\n  transpiler: 'esbuild' | 'swc' | 'sucrase',\n  tsconfig?: boolean | string | TsConfigJson | (() =\u003e MaybePromise\u003cboolean | string | TsConfigJson\u003e)\n)\n```\n\n```js\nesbuild(tsconfig?: boolean | string | TsConfigJson | (() =\u003e MaybePromise\u003cboolean | string | TsConfigJson\u003e))\n```\n\n```js\nswc(tsconfig?: boolean | string | TsConfigJson | (() =\u003e MaybePromise\u003cboolean | string | TsConfigJson\u003e))\n```\n\n```js\nsucrase(tsconfig?: boolean | string | TsConfigJson | (() =\u003e MaybePromise\u003cboolean | string | TsConfigJson\u003e))\n```\n\n### Option: `transpiler`\nType: `'esbuild' | 'swc' | 'sucrase'`\u003cbr\u003e\nOptional: no\n\nWhen using the generic `fastTypescript` export, you must specify the name of the transpiler to use.\n\n\u003e Again, remember that this plugin does not ship with, nor will it install for you, any of these transpilers; it is your responsibility to install the tool you plan to use.\n\n### Option: `tsconfig`\nType: `boolean | string | TsConfigJson | (() =\u003e MaybePromise\u003cboolean | string | TsConfigJson\u003e)`\u003cbr\u003e\nOptional: yes\u003cbr\u003e\nDefault: `true`\n\nSpecifies how to resolve TypeScript options:\n- `true` (the default) will load your project's `tsconfig.json` file.\n  - _Note: The file is assumed to live in the current working directory._\n- a non-empty string is assumed to be the path to the `tsconfig.json` file to load (e.g., `'./tsconfig.prod.json'`) or the name of an installed npm package exposing a `tsconfig.json` file (e.g., `'@tsconfig/node16/tsconfig.json'`).\n- an object is assumed to be a [`TsConfigJson`](https://www.typescriptlang.org/tsconfig/) object (note: the `TsConfigJson` interface is re-exported from [type-fest](https://github.com/sindresorhus/type-fest?tab=readme-ov-file#miscellaneous)).\n- `false` or an empty string will cause the selected transpiler to use its own default settings.\n- finally, if this parameter is a function, it must return any of the above, or a promise to a any of the above.\n\n\n## Things you should know\n- The plugin aims to emit the same code TypeScript's `tsc` would have given the passed `tsconfig.json`, no more, no less. Therefore, none of the supported transpilers specificities/unique features are exposed. In the simplest case, the transpiler is just a *\"get rid of type annotations\"* tool -- and a very fast one, for that matter.\u003cbr\u003e\nTo achieve its goal, the plugin does its best to call the selected transpiler's `transform` API with settings derived from the passed `tsconfig.json`. For example, TypeScript's `target` setting is mapped to the transpiler's corresponding setting.\u003cbr\u003e\n- Because Rollup internally works with ESM source files, the transpiler's output is always set to `'esm'`.\n  - `swc` does not handle [Typescript's import assignments](https://www.typescriptlang.org/docs/handbook/modules/reference.html#export--and-import--require) when targetting esm and will error out when it encounters one.\n\n\n## Generated warnings\nThe plugin may issue a few warnings during the build phase; here are their meaning.\n\n### isolatedModules\nBecause none of the third-party transpilers the plugin uses under the hood is type-aware, some techniques or features often used in TypeScript are not properly checked and can cause mis-compilation or even runtime errors.\n\nTo mitigate this, you should [set the `isolatedModules` option to true in tsconfig](https://www.typescriptlang.org/tsconfig#isolatedModules) and let your editor warn you when such incompatible constructs are used.\n\nYou should also run `tsc --noEmit` sometime in your build steps to double check.\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsepth%2Frollup-plugin-fast-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsepth%2Frollup-plugin-fast-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsepth%2Frollup-plugin-fast-typescript/lists"}