{"id":19852647,"url":"https://github.com/luanbitar/gatsby-alias-imports","last_synced_at":"2025-05-02T00:31:26.314Z","repository":{"id":57244541,"uuid":"225744521","full_name":"luanbitar/gatsby-alias-imports","owner":"luanbitar","description":"All your folders inside ir project will have alias by default","archived":false,"fork":false,"pushed_at":"2023-10-11T00:07:29.000Z","size":111,"stargazers_count":16,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-21T06:26:55.063Z","etag":null,"topics":["alias","aliases","gatsby","gatsby-plugin","javascript","js","npm","npm-package","plugin","react","reactjs","webpack"],"latest_commit_sha":null,"homepage":"https://www.gatsbyjs.org/packages/gatsby-alias-imports/?=alias#gatsby-alias-imports","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/luanbitar.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":"luanbitar"}},"created_at":"2019-12-04T00:33:09.000Z","updated_at":"2024-10-12T18:51:35.000Z","dependencies_parsed_at":"2024-06-18T19:51:01.831Z","dependency_job_id":"e0a01e3a-ae50-47a9-aef8-dfdc05744e65","html_url":"https://github.com/luanbitar/gatsby-alias-imports","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luanbitar%2Fgatsby-alias-imports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luanbitar%2Fgatsby-alias-imports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luanbitar%2Fgatsby-alias-imports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luanbitar%2Fgatsby-alias-imports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luanbitar","download_url":"https://codeload.github.com/luanbitar/gatsby-alias-imports/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251966431,"owners_count":21672666,"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":["alias","aliases","gatsby","gatsby-plugin","javascript","js","npm","npm-package","plugin","react","reactjs","webpack"],"created_at":"2024-11-12T14:03:50.399Z","updated_at":"2025-05-02T00:31:21.297Z","avatar_url":"https://github.com/luanbitar.png","language":"JavaScript","funding_links":["https://github.com/sponsors/luanbitar"],"categories":[],"sub_categories":[],"readme":"[![Version](https://img.shields.io/npm/v/gatsby-alias-imports.svg)](https://www.npmjs.com/package/gatsby-alias-imports)\n[![Downloads Total](https://img.shields.io/npm/dt/gatsby-alias-imports.svg)](https://www.npmjs.com/package/gatsby-alias-imports)\n\n# gatsby-alias-imports\n\nWebpack feature for aliasing in your import statements, just import this plugin and all of your folders inside your `src` will be available with aliases.\n\n```javascript\nimport \"styles/layout.css\"\nimport Header from \"components/Header\"\n```\n\nInstead of\n\n```javascript\nimport \"../../styles/layout.css\"\nimport Header from \"../components/Header/index.js\"\n```\n\n## Install\n\n`$ npm i gatsby-alias-imports`\n\nor\n\n`$ yarn add gatsby-alias-imports`\n\n## How to use\n\nAdd the plugin to your `gatsby-config.js`.\n\n```javascript\nmodule.exports = {\n  plugins: [\n    `gatsby-alias-imports`\n  ]\n}\n```\n\n## Options\n\n### aliases\n\nAlias should be an object where the keys are alias and values are string to path on project\n\nExample:\n```javascript\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-alias-imports`,\n      options: {\n        aliases: {\n          styles: `src/styles`,\n          config: `config/`,\n          \"@utils\": \"src/utils/\"\n        }\n      }\n    }\n  ]\n}\n```\n\n### rootFolder\n\nThe **rootFolder** it's in case you change your `src` folder name\n```javascript\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-alias-imports`,\n      options: {\n        rootFolder: `app`\n      }\n    }\n  ]\n}\n```\n\n## Further reading\n\nCheck out the [resolve section][1] of the Webpack config documentation for more information.\n\n[1]: https://webpack.js.org/configuration/resolve/#resolve-alias\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluanbitar%2Fgatsby-alias-imports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluanbitar%2Fgatsby-alias-imports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluanbitar%2Fgatsby-alias-imports/lists"}