2023-04-16 18:09:13 +08:00
|
|
|
import { fileURLToPath } from 'url'
|
|
|
|
import { resolve } from 'path'
|
|
|
|
import { defineConfig } from 'vitepress'
|
|
|
|
import vueJsxPlugin from '@vitejs/plugin-vue-jsx'
|
|
|
|
import VitePluginVitepressDemo from 'vite-plugin-vitepress-demo'
|
|
|
|
import getEnUSConfig from './config/en-US'
|
|
|
|
import getZhCNConfig from './config/zh-CN'
|
|
|
|
import { getRewrites } from './config/rewrites'
|
|
|
|
const baseSrc = fileURLToPath(new URL('./', import.meta.url))
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
rewrites: getRewrites(),
|
|
|
|
lang: 'en-US',
|
2023-04-16 21:52:44 +08:00
|
|
|
ignoreDeadLinks: true,
|
2023-04-16 18:09:13 +08:00
|
|
|
locales: {
|
|
|
|
'zh-CN': {
|
|
|
|
lang: 'zh-CN',
|
2023-04-17 21:02:44 +08:00
|
|
|
title: 'Antd Tiny Vue',
|
2023-04-16 18:09:13 +08:00
|
|
|
label: '简体中文',
|
|
|
|
description: 'vue3组件库站点',
|
|
|
|
themeConfig: getZhCNConfig()
|
|
|
|
},
|
|
|
|
root: {
|
|
|
|
lang: 'en-US',
|
2023-04-17 21:02:44 +08:00
|
|
|
title: 'Antd Tiny Vue',
|
2023-04-16 18:09:13 +08:00
|
|
|
label: 'English',
|
|
|
|
description: 'vue3 component library site',
|
|
|
|
themeConfig: getEnUSConfig()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
vite: {
|
|
|
|
plugins: [vueJsxPlugin(), VitePluginVitepressDemo()],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'antd-tiny-vue': resolve(baseSrc, '../components')
|
|
|
|
}
|
|
|
|
},
|
|
|
|
server: {
|
|
|
|
port: 1199
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|