diff --git a/packages/client/shim.d.ts b/packages/client/shim.d.ts index f18bbb5a44..db50f8cab6 100644 --- a/packages/client/shim.d.ts +++ b/packages/client/shim.d.ts @@ -2,7 +2,7 @@ declare interface Window { // extend the window } -// with vite-plugin-md, markdowns can be treat as Vue components +// with vite-plugin-vue-markdown, markdowns can be treat as Vue components declare module '*.md' { import type { ComponentOptions } from 'vue' const component: ComponentOptions diff --git a/packages/slidev/node/options.ts b/packages/slidev/node/options.ts index 5a65303b27..209b761fc3 100644 --- a/packages/slidev/node/options.ts +++ b/packages/slidev/node/options.ts @@ -2,7 +2,7 @@ import { dirname, join, resolve } from 'path' import type Vue from '@vitejs/plugin-vue' import type Icons from 'unplugin-icons/vite' import type Components from 'unplugin-vue-components/vite' -import type Markdown from 'vite-plugin-md' +import type Markdown from 'vite-plugin-vue-markdown' import type WindiCSS from 'vite-plugin-windicss' import type RemoteAssets from 'vite-plugin-remote-assets' import type ServerRef from 'vite-plugin-vue-server-ref' diff --git a/packages/slidev/node/plugins/markdown.ts b/packages/slidev/node/plugins/markdown.ts index 165a43983a..c48d87b902 100644 --- a/packages/slidev/node/plugins/markdown.ts +++ b/packages/slidev/node/plugins/markdown.ts @@ -1,4 +1,4 @@ -import Markdown from 'vite-plugin-md' +import Markdown from 'vite-plugin-vue-markdown' import type { Plugin } from 'vite' import * as base64 from 'js-base64' import { slash } from '@antfu/utils' diff --git a/packages/slidev/package.json b/packages/slidev/package.json index a7ed540b27..85c320e2d8 100644 --- a/packages/slidev/package.json +++ b/packages/slidev/package.json @@ -85,8 +85,8 @@ "unplugin-icons": "^0.14.3", "unplugin-vue-components": "^0.19.6", "vite": "^2.9.9", - "vite-plugin-md": "^0.13.1", "vite-plugin-remote-assets": "^0.2.2", + "vite-plugin-vue-markdown": "^0.1.0", "vite-plugin-vue-server-ref": "^0.2.4", "vite-plugin-windicss": "^1.8.4", "vue": "^3.2.36", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ca318bb194..9bf4d415b6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -269,8 +269,8 @@ importers: unplugin-icons: ^0.14.3 unplugin-vue-components: ^0.19.6 vite: ^2.9.9 - vite-plugin-md: ^0.13.1 vite-plugin-remote-assets: ^0.2.2 + vite-plugin-vue-markdown: ^0.1.0 vite-plugin-vue-server-ref: ^0.2.4 vite-plugin-windicss: ^1.8.4 vue: ^3.2.36 @@ -314,8 +314,8 @@ importers: unplugin-icons: 0.14.3_cyjpizlboac2xw76ngrtxfz55y unplugin-vue-components: 0.19.6_vite@2.9.9+vue@3.2.36 vite: 2.9.9 - vite-plugin-md: 0.13.1_vite@2.9.9 vite-plugin-remote-assets: 0.2.2_vite@2.9.9 + vite-plugin-vue-markdown: 0.1.0_vite@2.9.9 vite-plugin-vue-server-ref: 0.2.4_vite@2.9.9+vue@3.2.36 vite-plugin-windicss: 1.8.4_vite@2.9.9 vue: 3.2.36 @@ -6724,20 +6724,6 @@ packages: - supports-color dev: true - /vite-plugin-md/0.13.1_vite@2.9.9: - resolution: {integrity: sha512-ZLXRuhQCFVCvxTE79CtSOj71TknT7Hube5SN3aU65k7FpsIQ8ftQhMn3PbdVjHUlQRR462IuPsTYbyXHyrOmOQ==} - peerDependencies: - vite: ^2.0.0 - dependencies: - '@antfu/utils': 0.5.2 - '@rollup/pluginutils': 4.2.1 - '@types/markdown-it': 12.2.3 - '@vue/runtime-core': 3.2.36 - gray-matter: 4.0.3 - markdown-it: 13.0.1 - vite: 2.9.9 - dev: false - /vite-plugin-remote-assets/0.2.2_vite@2.9.9: resolution: {integrity: sha512-Hl2g1EGJW7jHjNKQ0hf96LJEbfmintfQLBIgKJkyFPyjO1NH3gNUheFgBoxi6G4/nbE9hHzpIIr30iwm1NxLlQ==} peerDependencies: @@ -6752,6 +6738,19 @@ packages: - supports-color dev: false + /vite-plugin-vue-markdown/0.1.0_vite@2.9.9: + resolution: {integrity: sha512-7mnWdF3PjJ2pHidcxwFkvKdT2Il5D9cXPnf9OmKeXo8DStBtz0RMb2TFw5QbVVxrlLUGoFZBsA/BIbGs5mXcdQ==} + peerDependencies: + vite: ^2.0.0 + dependencies: + '@antfu/utils': 0.5.2 + '@rollup/pluginutils': 4.2.1 + '@types/markdown-it': 12.2.3 + gray-matter: 4.0.3 + markdown-it: 13.0.1 + vite: 2.9.9 + dev: false + /vite-plugin-vue-server-ref/0.2.4_vite@2.9.9+vue@3.2.36: resolution: {integrity: sha512-+WAiq0fSfP+LbmTbx2BkDrL6sGWrb0sUGZPk+G3ZbbmowFNh3TY+f+AV1ofce0rKs4hvH3zBuXxEAkTf/wQqRA==} peerDependencies: