feat(文档): 添加RImg组件并配置资源路径别名
删除未使用的Custom.vue组件,新增RImg组件用于处理资源图片路径 在vite配置中添加资源路径别名,简化图片引用方式 更新client.ts注册RImg组件
This commit is contained in:
@@ -3,6 +3,11 @@ import { plumeTheme } from 'vuepress-theme-plume'
|
||||
import { viteBundler } from '@vuepress/bundler-vite'
|
||||
import { commentPlugin } from '@vuepress/plugin-comment'
|
||||
import { umamiAnalyticsPlugin } from '@vuepress/plugin-umami-analytics'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
|
||||
export default defineUserConfig({
|
||||
base: '/',
|
||||
@@ -14,7 +19,16 @@ export default defineUserConfig({
|
||||
['link', { rel: 'icon', type: 'image/png', href: 'https://theme-plume.vuejs.press/favicon-32x32.png' }],
|
||||
],
|
||||
|
||||
bundler: viteBundler(),
|
||||
bundler: viteBundler({
|
||||
viteOptions: {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@resources': path.resolve(__dirname, '../resources'),
|
||||
'/@resources': path.resolve(__dirname, '../resources'),
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
shouldPrefetch: false,
|
||||
|
||||
theme: plumeTheme({
|
||||
|
||||
Reference in New Issue
Block a user