From 8363a5f9553cd79ac77f1c28a3f66b44f0477c2a Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 1 Aug 2021 03:03:20 +0800 Subject: [PATCH] fix: inline white spaces in ssg --- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- vite.config.ts | 35 ++++++++++++++++++----------------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 1e7da7f..e0c5ba8 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "vite-plugin-pwa": "^0.9.3", "vite-plugin-vue-layouts": "^0.3.1", "vite-plugin-windicss": "^1.2.7", - "vite-ssg": "^0.14.4", + "vite-ssg": "^0.14.5", "vue-tsc": "^0.2.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dfda6e3..747be0b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,7 +29,7 @@ specifiers: vite-plugin-pwa: ^0.9.3 vite-plugin-vue-layouts: ^0.3.1 vite-plugin-windicss: ^1.2.7 - vite-ssg: ^0.14.4 + vite-ssg: ^0.14.5 vue: ^3.1.5 vue-demi: ^0.11.2 vue-global-api: ^0.4.1 @@ -73,7 +73,7 @@ devDependencies: vite-plugin-pwa: 0.9.3_vite@2.4.4 vite-plugin-vue-layouts: 0.3.1_vite@2.4.4 vite-plugin-windicss: 1.2.7_vite@2.4.4 - vite-ssg: 0.14.4_4d4bc60af3721dd3f198b31f3d098737 + vite-ssg: 0.14.5_4d4bc60af3721dd3f198b31f3d098737 vue-tsc: 0.2.2_typescript@4.3.5 packages: @@ -5808,8 +5808,8 @@ packages: - supports-color dev: true - /vite-ssg/0.14.4_4d4bc60af3721dd3f198b31f3d098737: - resolution: {integrity: sha512-Y2Q8Mx1FBqNcuAzRc9fx7N43uIYpkvrt0GssMa3hFVnXKZ7Zi1A0fvgvShwgH7WjZCwucZQFA5v40IvCaz1bOg==} + /vite-ssg/0.14.5_4d4bc60af3721dd3f198b31f3d098737: + resolution: {integrity: sha512-ony+HDOy+VoNboC2nD8WRTz860vhy+xMVxMtY0G6FQ1pCD06qfxCZobx3Lncza2IPB3ozmSVQNQd3W4apJI1pA==} engines: {node: '>=14.0.0'} hasBin: true peerDependencies: diff --git a/vite.config.ts b/vite.config.ts index 1a3414e..90a3fc9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -34,23 +34,6 @@ export default defineConfig({ // https://github.com/JohnCampionJr/vite-plugin-vue-layouts Layouts(), - // https://github.com/antfu/vite-plugin-md - Markdown({ - wrapperClasses: markdownWrapperClasses, - headEnabled: true, - markdownItSetup(md) { - // https://prismjs.com/ - md.use(Prism) - md.use(LinkAttributes, { - pattern: /^https?:\/\//, - attrs: { - target: '_blank', - rel: 'noopener', - }, - }) - }, - }), - // https://github.com/antfu/vite-plugin-components ViteComponents({ // allow auto load markdown components under `./src/components/` @@ -80,6 +63,24 @@ export default defineConfig({ safelist: markdownWrapperClasses, }), + // https://github.com/antfu/vite-plugin-md + // Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite + Markdown({ + wrapperClasses: markdownWrapperClasses, + headEnabled: true, + markdownItSetup(md) { + // https://prismjs.com/ + md.use(Prism) + md.use(LinkAttributes, { + pattern: /^https?:\/\//, + attrs: { + target: '_blank', + rel: 'noopener', + }, + }) + }, + }), + // https://github.com/antfu/vite-plugin-pwa VitePWA({ registerType: 'autoUpdate',