{"id":19904373,"url":"https://github.com/alloc/vite-plugin-rehost","last_synced_at":"2025-07-04T03:05:25.394Z","repository":{"id":57393173,"uuid":"330761852","full_name":"alloc/vite-plugin-rehost","owner":"alloc","description":"Self-hosted resources from index.html","archived":false,"fork":false,"pushed_at":"2021-10-15T20:04:22.000Z","size":65,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-22T09:55:31.273Z","etag":null,"topics":["vite","vite-plugin"],"latest_commit_sha":null,"homepage":"","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/alloc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-18T19:06:00.000Z","updated_at":"2021-10-15T20:04:25.000Z","dependencies_parsed_at":"2022-09-15T02:52:27.302Z","dependency_job_id":null,"html_url":"https://github.com/alloc/vite-plugin-rehost","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/alloc/vite-plugin-rehost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Fvite-plugin-rehost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Fvite-plugin-rehost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Fvite-plugin-rehost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Fvite-plugin-rehost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alloc","download_url":"https://codeload.github.com/alloc/vite-plugin-rehost/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alloc%2Fvite-plugin-rehost/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262564676,"owners_count":23329549,"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":["vite","vite-plugin"],"created_at":"2024-11-12T20:28:07.360Z","updated_at":"2025-07-04T03:05:25.357Z","avatar_url":"https://github.com/alloc.png","language":"TypeScript","funding_links":["https://paypal.me/alecdotbiz"],"categories":[],"sub_categories":[],"readme":"# vite-plugin-rehost\n\n[![npm](https://img.shields.io/npm/v/vite-plugin-rehost.svg)](https://www.npmjs.com/package/vite-plugin-rehost)\n[![Code style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/alecdotbiz)\n\n\u003e Self-hosted resources from index.html\n\nAny `\u003clink rel=\"stylesheet\"\u003e` and `\u003cscript\u003e` elements that point to external URLs are fetched\nat build time and saved to the `outDir` to be self-hosted. The resources will have a content \nhash in their name, so [`Cache-Control: immutable`](https://www.keycdn.com/blog/cache-control-immutable) can be used.\n\nWithin self-hosted `.css` files, any `url()` expressions that point to external URLs are also\nfetched and saved to the `outDir` to be self-hosted.\n\n**Note:** This plugin depends on [#1675](https://github.com/vitejs/vite/pull/1675)\n\n\u0026nbsp;\n\n### Usage\n\n```sh\nyarn add vite-plugin-rehost -D\n```\n\nWithin your `vite.config.js` file:\n\n```ts\nimport rehost from 'vite-plugin-rehost'\n\nexport default {\n  plugins: [\n    rehost(),\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Fvite-plugin-rehost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falloc%2Fvite-plugin-rehost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falloc%2Fvite-plugin-rehost/lists"}