{"id":15193973,"url":"https://github.com/react-doc/url-replace-loader","last_synced_at":"2026-03-03T09:32:31.728Z","repository":{"id":57387615,"uuid":"117713893","full_name":"react-doc/url-replace-loader","owner":"react-doc","description":"Loads files as `base64` encoded URL, url-loader enhanced.","archived":false,"fork":false,"pushed_at":"2018-01-16T17:24:31.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T18:29:13.754Z","etag":null,"topics":["rdoc","webpack","webpack-loader","webpack3"],"latest_commit_sha":null,"homepage":"","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/react-doc.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":"2018-01-16T17:03:18.000Z","updated_at":"2018-01-18T03:24:22.000Z","dependencies_parsed_at":"2022-09-26T16:50:52.378Z","dependency_job_id":null,"html_url":"https://github.com/react-doc/url-replace-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/react-doc/url-replace-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-doc%2Furl-replace-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-doc%2Furl-replace-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-doc%2Furl-replace-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-doc%2Furl-replace-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-doc","download_url":"https://codeload.github.com/react-doc/url-replace-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-doc%2Furl-replace-loader/sbom","scorecard":{"id":765462,"data":{"date":"2025-08-11","repo":{"name":"github.com/react-doc/url-replace-loader","commit":"484268c1b865bb7ade57b831012a9ccaf163d15d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T00:38:23.032Z","repository_id":57387615,"created_at":"2025-08-23T00:38:23.032Z","updated_at":"2025-08-23T00:38:23.032Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30039885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T06:58:30.252Z","status":"ssl_error","status_checked_at":"2026-03-03T06:58:15.329Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["rdoc","webpack","webpack-loader","webpack3"],"created_at":"2024-09-27T22:21:06.082Z","updated_at":"2026-03-03T09:32:31.687Z","avatar_url":"https://github.com/react-doc.png","language":"JavaScript","readme":"\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/webpack/webpack\"\u003e\n    \u003cimg width=\"200\" height=\"200\"\n      src=\"https://cdn.rawgit.com/webpack/media/e7485eb2/logo/icon.svg\"\u003e\n  \u003c/a\u003e\n  \u003ch1\u003eURL Replace Loader\u003c/h1\u003e\n  \u003cp\u003eLoads files as `base64` encoded URL, \u003ca href=\"https://github.com/webpack-contrib/url-loader\"\u003eurl-loader\u003c/a\u003e enhanced.\u003c/p\u003e\n\u003c/div\u003e\n\n\n\u003ch2 align=\"center\"\u003eInstall\u003c/h2\u003e\n\n```bash\nnpm install --save-dev url-replace-loader\n```\n\n\u003ch2 align=\"center\"\u003e\u003ca href=\"https://webpack.js.org/concepts/loaders\"\u003eUsage\u003c/a\u003e\u003c/h2\u003e\n\nThe `url-loader` works like the [`file-loader`](https://github.com/webpack-contrib/file-loader), but can return a DataURL if the file is smaller than a byte limit.\n\n\n```js\nimport img from './image.png'\n```\n\n**webpack.config.js**\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.(svg|png|bmp|jpg|jpeg|gif)$/,\n        loader: require.resolve('url-loader'),\n        options: {\n          limit: 8192,\n          name: 'img/[name].[hash:8].[ext]',\n          replace: [\n            {\n              test: /rdoc\\.logo\\.svg$/,\n              path: 'path/to/logo.svg',\n            }\n          ]\n        },\n      },\n    ]\n  }\n}\n```\n\n\n\u003ch2 align=\"center\"\u003eOptions\u003c/h2\u003e\n\n|Name|Type|Default|Description|\n|:--:|:--:|:-----:|:----------|\n|**`limit`**|`{Number}`|`undefined`|Byte limit to inline files as Data URL|\n|**`mimetype`**|`{String}`|`extname`|Specify MIME type for the file (Otherwise it's inferred from the file extension)|\n|**`fallback`**|`{String}`|`file-loader`|Specify `loader` for the file when file is greater than the limit (in bytes)|\n\n### `limit`\n\nIf the file is greater than the limit (in bytes) the [`file-loader`](https://github.com/webpack-contrib/file-loader) is used by default and all query parameters are passed to it.\nYou can use other loader using `fallback` option.\n\nThe limit can be specified via loader options and defaults to no limit.\n\n**webpack.config.js**\n\n```js\n{\n  loader: 'url-loader',\n  options: {\n    limit: 8192\n  }\n}\n```\n\n### `mimetype`\n\nSet the MIME type for the file. If unspecified the file extensions will be used to lookup the MIME type.\n\n**webpack.config.js**\n```js\n{\n  loader: 'url-loader',\n  options: {\n    mimetype: 'image/png'\n  }\n}\n```\n\n### `fallback`\n\n**webpack.config.js**\n```js\n{\n  loader: 'url-loader',\n  options: {\n    fallback: 'responsive-loader'\n  }\n}\n```\n\n### `replace`\n\nReplace with the specified picture.\n\n**webpack.config.js**\n```js\n{\n  loader: 'url-loader',\n  options: {\n    replace: [\n      {\n        test: /rdoc\\.logo\\.svg$/,\n        path: 'path/to/logo.svg',\n      }\n    ]\n  }\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-doc%2Furl-replace-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-doc%2Furl-replace-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-doc%2Furl-replace-loader/lists"}