1.0.1 • Published 2 years ago
@vavt/vite-plugin-import-markdown v1.0.1
@vavt/vite-plugin-import-markdown
Import markdown as a module.
Usage
Install
yarn add @vavt/vite-plugin-import-markdownConfig
vite.config.tsimport { defineConfig } from 'vite'; import markdown from '@vavt/vite-plugin-import-markdown'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [markdown()], });vite-env.d.tsdeclare module '*.md';file.tsimport mdText from './text.md'; console.log('Source Text: ', mdText);