{"id":15678039,"url":"https://github.com/ykzts/blurhash-loader","last_synced_at":"2025-05-07T02:21:43.247Z","repository":{"id":38964095,"uuid":"305441932","full_name":"ykzts/blurhash-loader","owner":"ykzts","description":"A blurhash loader module for webpack.","archived":false,"fork":false,"pushed_at":"2023-10-06T13:13:05.000Z","size":5286,"stargazers_count":12,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-27T04:03:40.109Z","etag":null,"topics":["blurhash","loader","webpack"],"latest_commit_sha":null,"homepage":"https://blurhash-loader.vercel.app/","language":"TypeScript","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/ykzts.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2020-10-19T16:12:16.000Z","updated_at":"2024-01-25T02:18:49.000Z","dependencies_parsed_at":"2024-10-23T13:28:28.014Z","dependency_job_id":null,"html_url":"https://github.com/ykzts/blurhash-loader","commit_stats":null,"previous_names":["inabagumi/blurhash-loader"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykzts%2Fblurhash-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykzts%2Fblurhash-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykzts%2Fblurhash-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ykzts%2Fblurhash-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ykzts","download_url":"https://codeload.github.com/ykzts/blurhash-loader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252799180,"owners_count":21805952,"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":["blurhash","loader","webpack"],"created_at":"2024-10-03T16:15:28.157Z","updated_at":"2025-05-07T02:21:43.198Z","avatar_url":"https://github.com/ykzts.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blurhash-loader\n\nA blurhash loader module for webpack.\n\n## Install\n\n```console\n$ npm install -D blurhash-loader\n```\n\nor\n\n```console\n$ yarn add -D blurhash-loader\n```\n\n## Usage\n\n### webpack.config.js\n\n```javascript\nmodule.exports = {\n  module: {\n    rules: [\n      test: /\\.(?:gif|jpe?g|png|webp)$/i,\n      use: [\n        {\n          loader: 'blurhash-loader',\n          options: {\n            componentX: 4,\n            componentY: 3\n          }\n        }\n      ]\n    ]\n  }\n}\n```\n\n### index.tsx\n\n```typescript\nimport { Blurhash } from 'react-blurhash'\nimport photo, { blurhash } from './photo.jpg'\n\nexport default function Home() {\n  return (\n    \u003cdiv\u003e\n      \u003cBlurhash hash={blurhash} height={600} width={800} /\u003e\n    \u003c/div\u003e\n  )\n}\n```\n\n## Options\n\n| Name         | Type                 | Default                     | Description                                              |\n| ------------ | -------------------- | --------------------------- | -------------------------------------------------------- |\n| `componentX` | `{Number}`           | `4`                         | A `componentX` is the value passed directly to blurhash. |\n| `componentY` | `{Number}`           | `3`                         | A `componentY` is the value passed directly to blurhash. |\n| `context`    | `{String}`           | `loaderContext.rootContext` | A custom file context.                                   |\n| `emitFile`   | `{Boolean}`          | `true`                      | Don't emit the file if `false` is specified.             |\n| `esModule`   | `{Boolean}`          | `true`                      | If enabled, use the ES modules syntax.                   |\n| `name`       | `{String\\|Function}` | `'[contenthash].[ext]'`     | The filename template for the target file.               |\n| `outputPath` | `{String\\|Function}` | `undefined`                 | A custom output path for the target file.                |\n| `publicPath` | `{String\\|Function}` | `undefined`                 | A custom public path for the target file.                |\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fykzts%2Fblurhash-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fykzts%2Fblurhash-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fykzts%2Fblurhash-loader/lists"}