{"id":13774360,"url":"https://github.com/Hedzer/rollup-plugin-import-alias","last_synced_at":"2025-05-11T06:32:53.343Z","repository":{"id":65491221,"uuid":"68554586","full_name":"Hedzer/rollup-plugin-import-alias","owner":"Hedzer","description":"Provides directory aliases for es2015 import statements.","archived":false,"fork":false,"pushed_at":"2019-07-14T18:09:55.000Z","size":15,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-14T12:02:48.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Hedzer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-19T00:12:49.000Z","updated_at":"2024-04-22T11:01:00.000Z","dependencies_parsed_at":"2023-01-25T18:45:28.024Z","dependency_job_id":null,"html_url":"https://github.com/Hedzer/rollup-plugin-import-alias","commit_stats":null,"previous_names":["hedzer/rollup-import-alias"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hedzer%2Frollup-plugin-import-alias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hedzer%2Frollup-plugin-import-alias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hedzer%2Frollup-plugin-import-alias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hedzer%2Frollup-plugin-import-alias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hedzer","download_url":"https://codeload.github.com/Hedzer/rollup-plugin-import-alias/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225022131,"owners_count":17408559,"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":"2024-08-03T17:01:26.003Z","updated_at":"2024-11-17T09:30:45.505Z","avatar_url":"https://github.com/Hedzer.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Modules"],"readme":"Rollup Import Alias\r\n=========\r\n\r\nProvides directory aliases for es2015 import statements. \r\n\r\n## Installation\r\n\r\n  npm install rollup-plugin-import-alias --save-dev\r\n\r\n## Usage\r\n### In rollup.plugins\r\n```javascript\r\nvar importAlias = require('rollup-plugin-import-alias');\r\n\r\nimportAlias({\r\n    Paths: {\r\n        TypeChecks: '../Common/TypeChecks',\r\n\tFramework: './V1.0/Framework'\t\t\t\t\t\r\n    },\r\n    Extensions: ['js']\r\n});\r\n```\r\n### In your modules\r\n```javascript\r\nimport isArray from 'TypeChecks/isArray';\r\n```\r\nThis import would actually look for file `../Common/TypeChecks/isArray`\r\n\r\n## So? Why Care\r\nAs I've worked more with ES2015 import statements I've noticed absolute paths being used to avoid \"import hell\".  This is great, but creates issues when copying files into other subdirectories that would break those paths.  With this super simple utility those absolute paths can be correctly re-mapped. \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHedzer%2Frollup-plugin-import-alias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHedzer%2Frollup-plugin-import-alias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHedzer%2Frollup-plugin-import-alias/lists"}