@vavt/vite-plugin-import-markdown
v1.0.1
Published
Import markdown as a module
Downloads
268
Readme
@vavt/vite-plugin-import-markdown
Import markdown as a module.
Usage
Install
yarn add @vavt/vite-plugin-import-markdown
Config
vite.config.ts
import { defineConfig } from 'vite'; import markdown from '@vavt/vite-plugin-import-markdown'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [markdown()], });
vite-env.d.ts
declare module '*.md';
file.ts
import mdText from './text.md'; console.log('Source Text: ', mdText);