chore: fix for makdown
This commit is contained in:
parent
f50a02666e
commit
d18168910e
@ -10,6 +10,8 @@ import Components from 'unplugin-vue-components/vite'
|
||||
import WindiCSS from 'vite-plugin-windicss'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import VueI18n from '@intlify/vite-plugin-vue-i18n'
|
||||
import Markdown from 'vite-plugin-md'
|
||||
import Inspect from 'vite-plugin-inspect'
|
||||
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
@ -19,10 +21,14 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
Vue(),
|
||||
Vue({
|
||||
include: [/\.vue$/, /\.md$/], // <--
|
||||
}),
|
||||
|
||||
// https://github.com/hannoeru/vite-plugin-pages
|
||||
Pages(),
|
||||
Pages({
|
||||
extensions: ['vue', 'md'],
|
||||
}),
|
||||
imagetools(),
|
||||
// https://github.com/JohnCampionJr/vite-plugin-vue-layouts
|
||||
Layouts({
|
||||
@ -32,10 +38,16 @@ export default defineConfig({
|
||||
|
||||
// https://github.com/antfu/unplugin-auto-import
|
||||
AutoImport({
|
||||
include: [
|
||||
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
|
||||
/\.vue$/, /\.vue\?vue/, // .vue
|
||||
/\.md$/, // .md
|
||||
],
|
||||
imports: [
|
||||
'vue',
|
||||
'vue-router',
|
||||
'vue-i18n',
|
||||
'vuex',
|
||||
'@vueuse/head',
|
||||
'@vueuse/core',
|
||||
],
|
||||
@ -44,6 +56,8 @@ export default defineConfig({
|
||||
|
||||
// https://github.com/antfu/vite-plugin-components
|
||||
Components({
|
||||
// allow auto load markdown components under `./src/components/`
|
||||
extensions: ['vue', 'md'],
|
||||
resolvers: [
|
||||
// auto import icons
|
||||
// https://github.com/antfu/vite-plugin-icons
|
||||
@ -52,6 +66,8 @@ export default defineConfig({
|
||||
enabledCollections: ['carbon'],
|
||||
}),
|
||||
],
|
||||
// allow auto import and register components used in markdown
|
||||
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
||||
dts: true,
|
||||
}),
|
||||
|
||||
@ -67,6 +83,14 @@ export default defineConfig({
|
||||
runtimeOnly: true,
|
||||
compositionOnly: true,
|
||||
include: [path.resolve(__dirname, 'locales/**')],
|
||||
}),
|
||||
// https://github.com/antfu/vite-plugin-md
|
||||
Markdown({
|
||||
}),
|
||||
// https://github.com/antfu/vite-plugin-inspect
|
||||
Inspect({
|
||||
// change this to enable inspect for debugging
|
||||
enabled: false,
|
||||
}),
|
||||
],
|
||||
|
||||
@ -75,7 +99,9 @@ export default defineConfig({
|
||||
strict: true,
|
||||
},
|
||||
},
|
||||
|
||||
build: {
|
||||
sourcemap: false,
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'vue',
|
||||
|
Loading…
Reference in New Issue
Block a user