- 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
13 lines
317 B
TypeScript
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 }
|
|
}
|
|
}
|
|
}
|
|
}
|