openpencil/vite/raw-markdown.ts
Danila Poyarkov c3f5189f8f style: tighten import grouping
- Configure oxfmt custom import groups for workspace, app, package, and test aliases
- Keep type imports grouped with their matching source category instead of one global tail group
- Expand the format script to cover formatter config, Vite files, and scripts
2026-05-06 02:22:08 +03:00

13 lines
284 B
TypeScript

import type { Plugin } from 'vite'
export function rawMarkdownPlugin(): Plugin {
return {
name: 'raw-md',
transform(code: string, id: string) {
if (id.endsWith('.md')) {
return { code: `export default ${JSON.stringify(code)}`, map: null }
}
}
}
}