{"id":28825640,"url":"https://github.com/silverwind/vite-yaml-plugin","last_synced_at":"2026-01-30T13:54:31.098Z","repository":{"id":272755879,"uuid":"917682047","full_name":"silverwind/vite-yaml-plugin","owner":"silverwind","description":"Vite plugin to import YAML files","archived":false,"fork":false,"pushed_at":"2025-04-05T22:50:47.000Z","size":1212,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T21:39:14.190Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/silverwind.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":"2025-01-16T13:01:58.000Z","updated_at":"2025-04-05T22:50:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"e112ff93-da23-48d1-b52e-fa195d589de7","html_url":"https://github.com/silverwind/vite-yaml-plugin","commit_stats":null,"previous_names":["silverwind/vite-yaml-plugin"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/silverwind/vite-yaml-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fvite-yaml-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fvite-yaml-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fvite-yaml-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fvite-yaml-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silverwind","download_url":"https://codeload.github.com/silverwind/vite-yaml-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fvite-yaml-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260669557,"owners_count":23044298,"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":"2025-06-19T02:04:53.949Z","updated_at":"2026-01-30T13:54:31.091Z","avatar_url":"https://github.com/silverwind.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vite-yaml-plugin\n[![](https://img.shields.io/npm/v/vite-yaml-plugin.svg?style=flat)](https://www.npmjs.org/package/vite-yaml-plugin) [![](https://img.shields.io/npm/dm/vite-yaml-plugin.svg)](https://www.npmjs.org/package/vite-yaml-plugin) [![](https://packagephobia.com/badge?p=vite-yaml-plugin)](https://packagephobia.com/result?p=vite-yaml-plugin)\n\nVite plugin to import YAML files, with minimal dependencies\n\n## Usage\n\n#### vite.config.js\n\n```js\nimport {defineConfig} from \"vite\";\nimport {yamlPlugin} from \"vite-yaml-plugin\";\n\nexport default defineConfig({\n  plugins: [\n    yamlPlugin(),\n  ],\n});\n```\n#### file.js\n\n```js\nimport foo from \"./foo.yaml\";\n```\n\n## Options\n\n- `match`: Regex to match the path against. Default: `/\\.(yaml|yml)$/i`.\n- `opts`: Options passed to js-yaml's `load` function.\n\n## Typescript\n\nAdd `vite-yaml-plugin/types` to your `types` in `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"types\": [\n      \"vite-yaml-plugin/types\"\n    ]\n  }\n}\n```\n\nAlternatively, you can also add ambient type declarations:\n\n```ts\ndeclare module \"*.yaml\" {\n  const value: Record\u003cstring, any\u003e;\n  export default value;\n}\ndeclare module \"*.yml\" {\n  const value: Record\u003cstring, any\u003e;\n  export default value;\n}\n```\n\n## Related\n\n- [`vite-string-plugin`](https://github.com/silverwind/vite-string-plugin)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverwind%2Fvite-yaml-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilverwind%2Fvite-yaml-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverwind%2Fvite-yaml-plugin/lists"}