{"id":13515570,"url":"https://github.com/ElMassimo/vite-plugin-xdm","last_synced_at":"2025-03-31T04:37:17.310Z","repository":{"id":66232030,"uuid":"406195075","full_name":"ElMassimo/vite-plugin-xdm","owner":"ElMassimo","description":"Use XDM in VIte.js","archived":true,"fork":false,"pushed_at":"2021-10-04T19:44:32.000Z","size":115,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T08:59:22.269Z","etag":null,"topics":["markdown","mdx","vite-plugin","xdm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ElMassimo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2021-09-14T02:18:43.000Z","updated_at":"2023-01-28T02:11:53.000Z","dependencies_parsed_at":"2024-02-24T23:32:28.816Z","dependency_job_id":null,"html_url":"https://github.com/ElMassimo/vite-plugin-xdm","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElMassimo%2Fvite-plugin-xdm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElMassimo%2Fvite-plugin-xdm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElMassimo%2Fvite-plugin-xdm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElMassimo%2Fvite-plugin-xdm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElMassimo","download_url":"https://codeload.github.com/ElMassimo/vite-plugin-xdm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246418698,"owners_count":20773935,"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":["markdown","mdx","vite-plugin","xdm"],"created_at":"2024-08-01T05:01:12.972Z","updated_at":"2025-03-31T04:37:12.336Z","avatar_url":"https://github.com/ElMassimo.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003ch2 align='center'\u003e\u003csamp\u003evite-plugin-xdm\u003c/samp\u003e\u003c/h2\u003e\n\n\u003cp align='center'\u003e\n  \u003ca href='https://www.npmjs.com/package/vite-plugin-xdm'\u003e\n    \u003cimg src='https://img.shields.io/npm/v/vite-plugin-xdm?color=222\u0026style=flat-square'\u003e\n  \u003c/a\u003e\n  \u003ca href='https://github.com/ElMassimo/vite-plugin-xdm/blob/main/LICENSE.txt'\u003e\n    \u003cimg src='https://img.shields.io/badge/license-MIT-blue.svg'\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n[plugin]: https://github.com/ElMassimo/vite-plugin-xdm\n[vite.js]: http://vitejs.dev/\n[xdm]: https://github.com/wooorm/xdm\n\n## Why? 🤔\n\n[xdm] is distributed as ESM-only, which makes it difficult to use\nin [Vite.js] projects that have any CJS dependencies.\n\nThis plugin is a light wrapper around [xdm] that can receive plugins as promises,\nsimplifying the usage to avoid `async` and `await` wrappers.\n\n\n## Installation 💿\n\nInstall the package as a development dependency:\n\n```bash\nnpm i -D vite-plugin-xdm # yarn add -D vite-plugin-xdm\n```\n\n## Usage 🚀\n\nYou can provide any options that [xdm] would receive for MDX compilation.\n\n```js\nimport { defineConfig } from 'vite'\nimport xdm from 'vite-plugin-xdm'\n\nexport default defineConfig({\n  plugins: [\n    xdm(\n      remarkPlugins: [\n        'remark-frontmatter',\n        import('remark-mdx-frontmatter').then(mod =\u003e\n          [(mod.default || mod).remarkMdxFrontmatter, { name: 'frontmatter' }]\n        ),\n      ],\n      rehypePlugins: [\n        ['@mapbox/rehype-prism', { alias: { markup: ['html', 'vue'] } }],\n      ],\n    ),\n  ],\n})\n```\n\nPromises are also supported with `rehypePlugins`.\n\n## Acknowledgements\n\n- [xdm] — Excellent library, fast, and very well documented.\n\n## License\n\nThis library is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FElMassimo%2Fvite-plugin-xdm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FElMassimo%2Fvite-plugin-xdm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FElMassimo%2Fvite-plugin-xdm/lists"}