44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
import { defineUserConfig } from 'vuepress';
|
|
import { viteBundler } from '@vuepress/bundler-vite';
|
|
import { getDirname, path } from 'vuepress/utils';
|
|
import theme from './theme.js';
|
|
|
|
const __dirname = getDirname(import.meta.url);
|
|
|
|
export default defineUserConfig({
|
|
base: '/',
|
|
|
|
lang: 'zh-CN',
|
|
title: '氓氓小栈',
|
|
description: '氓氓小栈',
|
|
|
|
head: [['link', { rel: 'icon', href: '/favicon.png' }]],
|
|
|
|
shouldPrefetch: false,
|
|
shouldPreload: false,
|
|
|
|
theme,
|
|
bundler: viteBundler({
|
|
viteOptions: {
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
quietDeps: true,
|
|
silenceDeprecations: ['if-function'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}),
|
|
alias: {
|
|
'@theme-hope/components/blog/BlogHero': path.resolve(__dirname, './components/BlogHero.vue'),
|
|
'@theme-hope/modules/blog/components/BlogHero': path.resolve(
|
|
__dirname,
|
|
'./components/BlogHero.vue',
|
|
),
|
|
},
|
|
|
|
// 和 PWA 一起启用
|
|
// VuePress 默认会预取页面资源;如后续启用 PWA,可按需显式调整。
|
|
});
|