{"id":14959299,"url":"https://github.com/luxass/unplugin-yaml","last_synced_at":"2026-02-15T13:14:54.299Z","repository":{"id":213387512,"uuid":"730826685","full_name":"luxass/unplugin-yaml","owner":"luxass","description":"📦 A unplugin that allow import of yaml files","archived":false,"fork":false,"pushed_at":"2025-02-05T04:50:16.000Z","size":1851,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T13:48:21.641Z","etag":null,"topics":["esbuild","rollup","unplugin","vite","webpack","yaml"],"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/luxass.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-12T18:58:14.000Z","updated_at":"2025-02-05T04:50:18.000Z","dependencies_parsed_at":"2024-01-15T19:10:18.810Z","dependency_job_id":"c6938065-adb2-4637-b5cf-b0ac1168116c","html_url":"https://github.com/luxass/unplugin-yaml","commit_stats":{"total_commits":129,"total_committers":2,"mean_commits":64.5,"dds":0.2093023255813954,"last_synced_commit":"39f926772ec07d9634fd6a1c834da454b8d0d947"},"previous_names":["luxass/unplugin-yaml"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Funplugin-yaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Funplugin-yaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Funplugin-yaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Funplugin-yaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luxass","download_url":"https://codeload.github.com/luxass/unplugin-yaml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238008441,"owners_count":19401255,"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":["esbuild","rollup","unplugin","vite","webpack","yaml"],"created_at":"2024-09-24T13:19:22.229Z","updated_at":"2025-10-24T16:31:50.957Z","avatar_url":"https://github.com/luxass.png","language":"TypeScript","readme":"# unplugin-yaml\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n\nAllow import YAML file for Vite, Webpack, Rollup and esbuild. With TypeScript support. Powered by [unplugin](https://github.com/unjs/unplugin).\n\n\u003cp align=\"center\"\u003e\n\u003cbr /\u003e\n\u003ca href=\"https://stackblitz.com/github/luxass/unplugin-yaml/tree/main/examples/vite-vue?file=vite.config.ts\"\u003e\u003cimg src=\"https://developer.stackblitz.com/img/open_in_stackblitz.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Install\n\n```bash\nnpm i -D unplugin-yaml\n```\n\n## Usage\n\n\u003e [!TIP]\n\u003e You can view all examples [here](./examples).\n\n\u003cdetails\u003e\n\u003csummary\u003eVite\u003c/summary\u003e\u003cbr/\u003e\n\n```ts\n// vite.config.ts\nimport YAMLPlugin from \"unplugin-yaml/vite\";\n\nexport default defineConfig({\n  plugins: [\n    YAMLPlugin({ /* options */ }),\n  ],\n});\n```\n\n\u003cbr/\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRollup\u003c/summary\u003e\u003cbr/\u003e\n\n```ts\n// rollup.config.js\nimport YAMLPlugin from \"unplugin-yaml/rollup\";\n\nexport default {\n  plugins: [\n    YAMLPlugin({ /* options */ }),\n  ],\n};\n```\n\n\u003cbr/\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWebpack\u003c/summary\u003e\u003cbr/\u003e\n\n```ts\n// webpack.config.js\nmodule.exports = {\n  /* ... */\n  plugins: [\n    require(\"unplugin-yaml/webpack\").default({ /* options */ }),\n  ],\n};\n```\n\n\u003cbr/\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eNuxt\u003c/summary\u003e\u003cbr/\u003e\n\n```ts\n// nuxt.config.js\nexport default defineNuxtConfig({\n  modules: [\n    [\"unplugin-yaml/nuxt\", { /* options */ }]\n  ],\n});\n```\n\n\u003cbr/\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eAstro\u003c/summary\u003e\u003cbr/\u003e\n\n```ts\n// astro.config.mjs\nimport { defineConfig } from \"astro/config\";\nimport YAMLPlugin from \"unplugin-yaml/astro\";\n\n// https://astro.build/config\nexport default defineConfig({\n  integrations: [\n    YAMLPlugin({\n      /* options */\n    })\n  ]\n});\n```\n\n\u003cbr/\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eesbuild\u003c/summary\u003e\u003cbr/\u003e\n\n```ts\n// esbuild.config.js\nimport { build } from \"esbuild\";\nimport YAMLPlugin from \"unplugin-yaml/esbuild\";\n\nbuild({\n  /* ... */\n  plugins: [\n    YAMLPlugin({\n      /* options */\n    }),\n  ],\n});\n```\n\n\u003cbr/\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eFarm\u003c/summary\u003e\u003cbr/\u003e\n\n```ts\n// farm.config.ts\nimport { defineConfig } from \"@farmfe/core\";\nimport vue from \"@vitejs/plugin-vue\";\nimport YAMLPlugin from \"unplugin-yaml/farm\";\n\nexport default defineConfig({\n  vitePlugins: [\n    vue(),\n  ],\n  plugins: [\n    YAMLPlugin({\n      /* options */\n    })\n  ]\n});\n```\n\n\u003cbr/\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRspack\u003c/summary\u003e\u003cbr/\u003e\n\n```ts\n// rspack.config.mjs\nimport rspack from \"@rspack/core\";\nimport YAMLPlugin from \"unplugin-yaml/rspack\";\n\n/** @type {import('@rspack/core').Configuration} */\nexport default {\n  plugins: [\n    new rspack.HtmlRspackPlugin({\n      template: \"./index.html\"\n    }),\n    YAMLPlugin()\n  ],\n};\n```\n\n\u003cbr/\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRolldown (Experimental)\u003c/summary\u003e\u003cbr/\u003e\n\n```ts\n// rolldown.config.js\nimport { defineConfig } from \"rolldown\";\nimport YAMLPlugin from \"unplugin-yaml/rolldown\";\n\nexport default defineConfig({\n  input: \"./index.js\",\n  plugins: [\n    YAMLPlugin({\n      /* options */\n    }),\n  ],\n});\n```\n\n\u003cbr/\u003e\u003c/details\u003e\n\n## Configuration\n\n```ts\nYAMLPlugin({\n  include: [\n    /\\.yamlcustom$/, // .yamlcustom\n  ],\n  parserOptions: {\n    // see yaml load options\n  }\n});\n```\n### TypeScript\n\nIf you are using TypeScript, you need to add the following to your `tsconfig.json` file:\n\n```json\n{\n  \"compilerOptions\": {\n    \"types\": [\n      \"unplugin-yaml/types\"\n    ]\n  }\n}\n```\n\n## 📄 License\n\nPublished under [MIT License](./LICENSE).\n\n[npm-version-src]: https://img.shields.io/npm/v/unplugin-yaml?style=flat\u0026colorA=18181B\u0026colorB=4169E1\n[npm-version-href]: https://npmjs.com/package/unplugin-yaml\n[npm-downloads-src]: https://img.shields.io/npm/dm/unplugin-yaml?style=flat\u0026colorA=18181B\u0026colorB=4169E1\n[npm-downloads-href]: https://npmjs.com/package/unplugin-yaml\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxass%2Funplugin-yaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluxass%2Funplugin-yaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxass%2Funplugin-yaml/lists"}