{"id":14969176,"url":"https://github.com/fastify/vite-plugin-blueprint","last_synced_at":"2025-10-19T09:32:24.915Z","repository":{"id":57393080,"uuid":"420390083","full_name":"fastify/vite-plugin-blueprint","owner":"fastify","description":"Vite plugin for shadowing files from a blueprint folder.","archived":false,"fork":false,"pushed_at":"2024-04-23T09:13:30.000Z","size":11,"stargazers_count":17,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-13T05:09:31.452Z","etag":null,"topics":["fastify-frontend"],"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/fastify.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},"funding":{"github":"fastify","open_collective":"fastify"}},"created_at":"2021-10-23T11:11:32.000Z","updated_at":"2024-08-23T15:25:37.303Z","dependencies_parsed_at":"2024-08-23T15:38:05.526Z","dependency_job_id":null,"html_url":"https://github.com/fastify/vite-plugin-blueprint","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"be45827595899d37d9d8fb8c935542c534bc79c1"},"previous_names":["terixjs/vite-plugin-blueprint"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastify%2Fvite-plugin-blueprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastify%2Fvite-plugin-blueprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastify%2Fvite-plugin-blueprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastify%2Fvite-plugin-blueprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastify","download_url":"https://codeload.github.com/fastify/vite-plugin-blueprint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219869245,"owners_count":16555572,"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":["fastify-frontend"],"created_at":"2024-09-24T13:41:17.563Z","updated_at":"2025-10-19T09:32:24.564Z","avatar_url":"https://github.com/fastify.png","language":"JavaScript","readme":"# vite-plugin-blueprint\n\nA [Vite](https://vitejs.dev/) plugin that lets you easily shadow files in your app directory from a _blueprint_. \n\nTake this simple Vite app as example:\n\n```\nexample/\n├── blueprint/\n│   ├── foobar.js\n│   └── main.js\n├── index.html\n└── vite.config.js\n```\n\nAnd this **vite.config.js**:\n\n```js\nimport vitePluginBlueprint from 'vite-plugin-blueprint'\n\nexport default {\n  plugins: [\n    vitePluginBlueprint({\n      root: resolve =\u003e resolve(import.meta.url, 'blueprint'),\n      prefix: '@blueprint/',\n      files: [\n        // Searches foobar.js in the app root directory, \n        // if not found, provide foobar.js from the blueprint root\n        ['foobar.js'],\n        // Searches for either main.js, index.js or start.js in the app root directory, \n        // if not found, provide main.js from the blueprint root\n        ['main.js', ['index.js', 'start.js']],\n      ],\n    }),\n  ],\n}\n```\n\nNow, if you delete the `main.js` file at the root, the app will still compile because that file will be shadowed by `main.js` under `blueprint/`, as long as you use the prefix you set when referencing files:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n    \u003ctitle\u003eVite App backed by Blueprint\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv id=\"app\"\u003e\u003c/div\u003e\n    \u003cscript type=\"module\" src=\"@blueprint/main\"\u003e\u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Install\n\n```bash\nnpm i vite-plugin-blueprint --save-dev\n```\n\n## License\n\nMIT\n","funding_links":["https://github.com/sponsors/fastify","https://opencollective.com/fastify"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastify%2Fvite-plugin-blueprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastify%2Fvite-plugin-blueprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastify%2Fvite-plugin-blueprint/lists"}