{"id":13606035,"url":"https://github.com/herberttn/vite-plugin-typescript-transform","last_synced_at":"2025-04-14T03:20:35.584Z","repository":{"id":178377393,"uuid":"661462283","full_name":"herberttn/vite-plugin-typescript-transform","owner":"herberttn","description":"Applies the TypeScript compiler during vite's transform build phase.","archived":false,"fork":false,"pushed_at":"2024-05-17T00:17:44.000Z","size":18,"stargazers_count":18,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-07T05:34:20.146Z","etag":null,"topics":["decorators","ecmascript","transform","typescript","vite","vite-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/herberttn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2023-07-02T23:17:33.000Z","updated_at":"2025-02-16T14:40:40.000Z","dependencies_parsed_at":"2024-01-07T18:05:07.486Z","dependency_job_id":"fa4d360e-5529-4c64-b9ea-6ad56bbe2c17","html_url":"https://github.com/herberttn/vite-plugin-typescript-transform","commit_stats":null,"previous_names":["herberttn/vite-plugin-typescript-transform"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herberttn%2Fvite-plugin-typescript-transform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herberttn%2Fvite-plugin-typescript-transform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herberttn%2Fvite-plugin-typescript-transform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herberttn%2Fvite-plugin-typescript-transform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herberttn","download_url":"https://codeload.github.com/herberttn/vite-plugin-typescript-transform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248814036,"owners_count":21165666,"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":["decorators","ecmascript","transform","typescript","vite","vite-plugin"],"created_at":"2024-08-01T19:01:05.433Z","updated_at":"2025-04-14T03:20:35.562Z","avatar_url":"https://github.com/herberttn.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Framework-agnostic Plugins"],"readme":"vite-plugin-typescript-transform\n---\n\n[![ci][badge-workflow-ci]][badge-workflow-ci-link]\n[![npm][badge-npm]][badge-npm-link]\n[![license][badge-license]][badge-license-link]\n\n[badge-license]: https://img.shields.io/github/license/herberttn/vite-plugin-typescript-transform?style=flat-square\n[badge-license-link]: ./LICENSE.md\n[badge-npm]: https://img.shields.io/npm/v/vite-plugin-typescript-transform?logo=npm\u0026style=flat-square\n[badge-npm-link]: https://www.npmjs.com/package/vite-plugin-typescript-transform\n[badge-workflow-ci]: https://img.shields.io/github/actions/workflow/status/herberttn/vite-plugin-typescript-transform/ci.yml?branch=main\u0026label=ci\u0026logo=github\u0026style=flat-square\n[badge-workflow-ci-link]: https://github.com/herberttn/vite-plugin-typescript-transform/actions/workflows/ci.yml\n\nApplies the TypeScript compiler during Vite transform build phase.\n\nThis plugin may allow the use of language features not yet supported by [`vite's`][link-to-vite] default compiler, [`esbuild`][link-to-esbuild].\n\n[link-to-ecmascript-decorators]: https://tc39.es/proposal-decorators\n[link-to-esbuild]: https://www.npmjs.com/package/esbuild\n[link-to-nodejs]: https://nodejs.org\n[link-to-typescript-v5-announcement]: https://devblogs.microsoft.com/typescript/announcing-typescript-5-0\n[link-to-typescript]: https://www.npmjs.com/package/typescript\n[link-to-vite]: https://www.npmjs.com/package/vite\n[link-to-options]: ./src/types.ts#L4\n\n### Install\n```shell\nnpm install --save-dev vite-plugin-typescript-transform\n```\n\n### Options\nSee the [`Options`][link-to-options] interface and its inline documentation.\n\n### Warning\nThis plugin does not change or disable any of [`vite's`][link-to-vite] compiler/features/options. It only transpiles the code using the [`typescript`][link-to-typescript] compiler and lets [`vite`][link-to-vite] move on with the transpiled code.\n\n### Transform ECMAScript decorators\nThe new [ECMAScript decorators][link-to-ecmascript-decorators] are not supported by [`esbuild`][link-to-esbuild] (yet), but they are supported by [`typescript`][link-to-typescript] since `v5` ([see the announcement][link-to-typescript-v5-announcement]). This example down-levels the new decorators into code that is usable in runtimes that do not yet support it.\n```typescript\nimport ts from 'typescript';\nimport { defineConfig } from 'vite';\nimport { vitePluginTypescriptTransform } from 'vite-plugin-typescript-transform';\n\nexport default defineConfig({\n  // ...your vite configuration\n  plugins: [\n    vitePluginTypescriptTransform({\n      enforce: 'pre',\n      filter: {\n        files: {\n          include: /\\.ts$/,\n        },\n      },\n      tsconfig: {\n        override: {\n          target: ts.ScriptTarget.ES2021,\n        },\n      },\n    }),\n  ],\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherberttn%2Fvite-plugin-typescript-transform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherberttn%2Fvite-plugin-typescript-transform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherberttn%2Fvite-plugin-typescript-transform/lists"}