{"id":18690045,"url":"https://github.com/yakovlev-alexey/parcel-resolver-ts-base-url","last_synced_at":"2025-04-12T05:54:13.994Z","repository":{"id":57319130,"uuid":"443321780","full_name":"yakovlev-alexey/parcel-resolver-ts-base-url","owner":"yakovlev-alexey","description":"Resolve tsconfig baseUrl and paths imports with Parcel","archived":false,"fork":false,"pushed_at":"2022-12-15T07:48:15.000Z","size":146,"stargazers_count":14,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T01:23:51.016Z","etag":null,"topics":["aliases","base-url","baseurl","parcel","parcel-resolver","paths","resolver","tsconfig"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/parcel-resolver-ts-base-url","language":"JavaScript","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/yakovlev-alexey.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}},"created_at":"2021-12-31T10:41:50.000Z","updated_at":"2024-09-04T16:30:01.000Z","dependencies_parsed_at":"2023-01-29T02:31:46.199Z","dependency_job_id":null,"html_url":"https://github.com/yakovlev-alexey/parcel-resolver-ts-base-url","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakovlev-alexey%2Fparcel-resolver-ts-base-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakovlev-alexey%2Fparcel-resolver-ts-base-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakovlev-alexey%2Fparcel-resolver-ts-base-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakovlev-alexey%2Fparcel-resolver-ts-base-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yakovlev-alexey","download_url":"https://codeload.github.com/yakovlev-alexey/parcel-resolver-ts-base-url/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065283,"owners_count":21041872,"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":["aliases","base-url","baseurl","parcel","parcel-resolver","paths","resolver","tsconfig"],"created_at":"2024-11-07T10:46:13.102Z","updated_at":"2025-04-12T05:54:13.965Z","avatar_url":"https://github.com/yakovlev-alexey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parcel-resolver-ts-base-url\n\nAt the moment Parcel does not support resolving imports using `paths` and `baseUrl` properties from `tsconfig.json`. This is a big issue both when migrating existing projects leveraging these properties and for developers having preference for TypeScript path aliases. This resolver allows you to use the same imports with `parcel@^2` as when using `tsc`.\n\n![](https://img.shields.io/bundlephobia/minzip/parcel-resolver-ts-base-url?style=social)\n\n## Table of Contents\n\n- [parcel-resolver-ts-base-url](#parcel-resolver-ts-base-url)\n- [Table of Contents](#table-of-contents)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\nYou can install `parcel-resolver-ts-base-url` using npm or yarn:\n\n```bash\nnpm i --save-dev parcel-resolver-ts-base-url\n# or\nyarn add -D parcel-resolver-ts-base-url\n```\n\n## Usage\n\nSimply add `parcel-resolver-ts-base-url` to your `.parcelrc`:\n\n```json\n{\n  \"extends\": \"@parcel/config-default\",\n  \"resolvers\": [\"parcel-resolver-ts-base-url\", \"...\"]\n}\n```\n\n\u003e At the moment `parcel` doesn't provide a way to specify `tsconfig.json` location I know of. `parcel-resolver-ts-base-url` will look for `tsconfig.json` recursively from the import location to the project root (`.parcelrc` location) like Parcel itself does.\n\nRead more about `parcel` configuration in [official docs](https://parceljs.org/features/plugins/).\n\n### Known Issues\n\n- ~~HMR support is unknown.~~ Manually tested and seems to be working. Make sure to submit a [GitHub issue](https://github.com/yakovlev-alexey/parcel-resolver-ts-base-url/issues) if it does not work for you.\n- ~~Resources imports using `baseUrl` or `paths` is unsupported in this resolver. Feel free to submit a PR.~~ Has been implemented with tests in place.\n\n## Contributing\n\nFeel free to send any suggestions in [GitHub issues](https://github.com/yakovlev-alexey/parcel-resolver-ts-base-url/issues): comment or vote on an existing issue, open a new one or create a Pull Request with your feature. Please make sure to add relevant test cases.\n\n## License\n\n[MIT](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakovlev-alexey%2Fparcel-resolver-ts-base-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyakovlev-alexey%2Fparcel-resolver-ts-base-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakovlev-alexey%2Fparcel-resolver-ts-base-url/lists"}