openpencil/vite/raw-markdown.ts
Danila Poyarkov 54310308dc refactor(kiwi): split schema text from runtime
- Move the Kiwi runtime under schema-runtime to match folder naming
- Load the Figma schema from a .kiwi text asset with static validation
- Assert Figma clipboard-derived field numbers for fragile layout/text fields
2026-05-21 14:54:12 +03:00

13 lines
317 B
TypeScript

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