{"id":29098453,"url":"https://github.com/luxass/unplugin-toml","last_synced_at":"2026-04-26T05:05:57.005Z","repository":{"id":296043694,"uuid":"992150814","full_name":"luxass/unplugin-toml","owner":"luxass","description":"📦 A unplugin that allow import of toml files","archived":false,"fork":false,"pushed_at":"2026-04-25T14:50:42.000Z","size":1215,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-25T16:26:52.942Z","etag":null,"topics":["esbuild","rolldown","rspack","toml","unplugin","vite"],"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":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"luxass"}},"created_at":"2025-05-28T17:40:49.000Z","updated_at":"2026-04-17T15:17:36.000Z","dependencies_parsed_at":"2025-05-28T18:53:30.006Z","dependency_job_id":"00d3ed4e-e6a1-4e90-bc87-3f82721e6314","html_url":"https://github.com/luxass/unplugin-toml","commit_stats":null,"previous_names":["luxass/unplugin-toml"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/luxass/unplugin-toml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Funplugin-toml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Funplugin-toml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Funplugin-toml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Funplugin-toml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luxass","download_url":"https://codeload.github.com/luxass/unplugin-toml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Funplugin-toml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32286274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"online","status_checked_at":"2026-04-26T02:00:05.962Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","rolldown","rspack","toml","unplugin","vite"],"created_at":"2025-06-28T15:01:13.931Z","updated_at":"2026-04-26T05:05:56.999Z","avatar_url":"https://github.com/luxass.png","language":"TypeScript","readme":"# unplugin-toml\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n\nAllow import Toml file for Vite, Webpack, Rollup and esbuild. With TypeScript support. Powered by [unplugin](https://github.com/unjs/unplugin).\n\n## Install\n\n```bash\nnpm i -D unplugin-toml\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 TOMLPlugin from \"unplugin-toml/vite\";\n\nexport default defineConfig({\n  plugins: [\n    TOMLPlugin({\n      /* options */\n    }),\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 TOMLPlugin from \"unplugin-toml/rollup\";\n\nexport default {\n  plugins: [\n    TOMLPlugin({\n      /* options */\n    }),\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-toml/webpack\").default({\n      /* options */\n    }),\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    [\n      \"unplugin-toml/nuxt\",\n      {\n        /* options */\n      },\n    ],\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 TOMLPlugin from \"unplugin-toml/astro\";\n\n// https://astro.build/config\nexport default defineConfig({\n  integrations: [\n    TOMLPlugin({\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 TOMLPlugin from \"unplugin-toml/esbuild\";\n\nbuild({\n  /* ... */\n  plugins: [\n    TOMLPlugin({\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 TOMLPlugin from \"unplugin-toml/rspack\";\n\n/** @type {import('@rspack/core').Configuration} */\nexport default {\n  plugins: [\n    new rspack.HtmlRspackPlugin({\n      template: \"./index.html\",\n    }),\n    TOMLPlugin(),\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 TOMLPlugin from \"unplugin-toml/rolldown\";\n\nexport default defineConfig({\n  input: \"./index.js\",\n  plugins: [\n    TOMLPlugin({\n      /* options */\n    }),\n  ],\n});\n```\n\n\u003cbr/\u003e\u003c/details\u003e\n\n## Configuration\n\n```ts\nTOMLPlugin({\n  include: [\n    /\\.tomlcustom$/, // .tomlcustom\n  ],\n  parserOptions: {\n    // see toml load options\n  },\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\": [\"unplugin-toml/types\"]\n  }\n}\n```\n\n## 📄 License\n\nPublished under [MIT License](./LICENSE).\n\n[npm-version-src]: https://img.shields.io/npm/v/unplugin-toml?style=flat\u0026colorA=18181B\u0026colorB=4169E1\n[npm-version-href]: https://npmjs.com/package/unplugin-toml\n[npm-downloads-src]: https://img.shields.io/npm/dm/unplugin-toml?style=flat\u0026colorA=18181B\u0026colorB=4169E1\n[npm-downloads-href]: https://npmjs.com/package/unplugin-toml\n","funding_links":["https://github.com/sponsors/luxass"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxass%2Funplugin-toml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluxass%2Funplugin-toml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxass%2Funplugin-toml/lists"}