{"id":16294232,"url":"https://github.com/simonhaenisch/rollup-plugin-typescript-paths","last_synced_at":"2025-05-07T07:19:45.440Z","repository":{"id":34894780,"uuid":"187811455","full_name":"simonhaenisch/rollup-plugin-typescript-paths","owner":"simonhaenisch","description":"Rollup Plugin to automatically resolve path aliases set in the compilerOptions section of tsconfig.json.","archived":false,"fork":false,"pushed_at":"2024-02-24T23:03:30.000Z","size":49,"stargazers_count":46,"open_issues_count":5,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T07:19:37.824Z","etag":null,"topics":["rollup-plugin","typescript","typescript-paths"],"latest_commit_sha":null,"homepage":"https://npmjs.com/rollup-plugin-typescript-paths","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/simonhaenisch.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","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":"2019-05-21T10:01:49.000Z","updated_at":"2025-01-16T02:52:03.000Z","dependencies_parsed_at":"2024-06-18T14:03:27.315Z","dependency_job_id":"dd8d88ab-6dd1-4f67-863c-75d0501b80d5","html_url":"https://github.com/simonhaenisch/rollup-plugin-typescript-paths","commit_stats":{"total_commits":53,"total_committers":5,"mean_commits":10.6,"dds":0.07547169811320753,"last_synced_commit":"feb243523c4a7e8f587e951ccc203a169230a585"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonhaenisch%2Frollup-plugin-typescript-paths","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonhaenisch%2Frollup-plugin-typescript-paths/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonhaenisch%2Frollup-plugin-typescript-paths/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonhaenisch%2Frollup-plugin-typescript-paths/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonhaenisch","download_url":"https://codeload.github.com/simonhaenisch/rollup-plugin-typescript-paths/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252831290,"owners_count":21810785,"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":["rollup-plugin","typescript","typescript-paths"],"created_at":"2024-10-10T20:14:37.627Z","updated_at":"2025-05-07T07:19:45.418Z","avatar_url":"https://github.com/simonhaenisch.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rollup-plugin-typescript-paths\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/simonhaenisch/rollup-plugin-typescript-paths/main.yml)](https://github.com/simonhaenisch/rollup-plugin-typescript-paths/actions?query=branch%3Amaster)\n\nRollup Plugin to automatically resolve path aliases set in the `compilerOptions` section of `tsconfig.json`.\n\nDon't use it if you're already using [rollup-plugin-typescript](https://github.com/rollup/rollup-plugin-typescript). This plugin is only for use cases where your TypeScript code has already been transpiled before `rollup` runs.\n\nFor example, if you have\n\n```js\n// tsconfig.json\n{\n  \"compilerOptions\": {\n    // ...\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@utils\": [\"src/helpers/utils\"]\n    }\n  }\n}\n```\n\n```js\nimport { something } from '@utils';\n```\n\nThen this plugin will make sure that rollup knows how to resolve `@utils`.\n\n## Features\n\n- No config required. 😎\n- Wildcards are supported. 💪\n- Uses `nodeModuleNameResolver` from the Typescript API. 🤓\n\n## Installation\n\n```\nnpm install --save-dev rollup-plugin-typescript-paths\n```\n\n## Usage\n\n```js\nimport { typescriptPaths } from 'rollup-plugin-typescript-paths';\n\nexport default {\n  // ...\n  plugins: [typescriptPaths()],\n};\n```\n\n## Options\n\n- **`absolute`:** Whether to resolve to absolute paths; defaults to `true`.\n- **`nonRelative`:** Whether to resolve [non-relative paths](https://www.typescriptlang.org/docs/handbook/module-resolution.html#relative-vs-non-relative-module-imports) based on tsconfig's `baseUrl`, even if none of the `paths` are matched; defaults to `false`.\n- **`preserveExtensions`:** Whether to preserve `.ts` and `.tsx` file extensions instead of having them changed to `.js`; defaults to `false`.\n- **`tsConfigPath`:** Custom path to your `tsconfig.json`. Use this if the plugin can't seem to find the correct one by itself.\n- **`transform`:** If the plugin successfully resolves a path, this function allows you to hook into the process and transform that path before it is returned.\n\n## License\n\n[MIT](/license).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonhaenisch%2Frollup-plugin-typescript-paths","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonhaenisch%2Frollup-plugin-typescript-paths","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonhaenisch%2Frollup-plugin-typescript-paths/lists"}