{"id":21082257,"url":"https://github.com/olsonpm/root-loader","last_synced_at":"2025-03-14T04:43:08.895Z","repository":{"id":80606775,"uuid":"76139880","full_name":"olsonpm/root-loader","owner":"olsonpm","description":null,"archived":false,"fork":false,"pushed_at":"2016-12-11T18:33:36.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T23:45:41.262Z","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/olsonpm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-10T21:57:22.000Z","updated_at":"2016-12-10T21:58:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"9060f768-430e-4d6d-97ad-f6370a737acd","html_url":"https://github.com/olsonpm/root-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Froot-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Froot-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Froot-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Froot-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olsonpm","download_url":"https://codeload.github.com/olsonpm/root-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526853,"owners_count":20305112,"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-11-19T20:13:28.936Z","updated_at":"2025-03-14T04:43:08.873Z","avatar_url":"https://github.com/olsonpm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# root-loader\n\na two-line loader that expands root paths to the configured root directory\n\nFor example the following directory structure inside `/path/to/project`\n```\nwebpack.config.js\n\nlib/\n  utils.js\n\nclient/\n  js/\n    index.js\n```\n\nand the following loader configuration\n\n```js\n{\n  test: /\\.js$/\n  , exclude: /(node_modules)/\n  , loader: 'root'\n  , query: {\n    rootPath: __dirname\n  }\n}\n```\n\nwould expand this require statement\n\n```js\n// client/js/index.js\nrequire('/lib/utils');\n```\n\ninto\n```js\n// client/js/index.js\nrequire('/path/to/project/lib/utils');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folsonpm%2Froot-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folsonpm%2Froot-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folsonpm%2Froot-loader/lists"}