feat: optimize blog build and deployment
This commit is contained in:
+24
-25
@@ -1,38 +1,37 @@
|
||||
import {defineUserConfig} from "vuepress";
|
||||
import {viteBundler} from "@vuepress/bundler-vite";
|
||||
import {getDirname, path} from "vuepress/utils";
|
||||
import theme from "./theme.js";
|
||||
|
||||
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: "/",
|
||||
base: '/',
|
||||
|
||||
lang: "zh-CN",
|
||||
title: "氓氓小栈",
|
||||
description: "氓氓小栈",
|
||||
lang: 'zh-CN',
|
||||
title: '氓氓小栈',
|
||||
description: '氓氓小栈',
|
||||
theme,
|
||||
bundler: viteBundler({
|
||||
viteOptions: {
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
quietDeps: true,
|
||||
silenceDeprecations: ["if-function"],
|
||||
},
|
||||
},
|
||||
},
|
||||
bundler: viteBundler({
|
||||
viteOptions: {
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
quietDeps: true,
|
||||
silenceDeprecations: ['if-function'],
|
||||
},
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
}),
|
||||
alias: {
|
||||
"@theme-hope/modules/blog/components/BlogHero": path.resolve(
|
||||
__dirname,
|
||||
"./components/BlogHero.vue",
|
||||
'@theme-hope/components/blog/BlogHero': path.resolve(__dirname, './components/BlogHero.vue'),
|
||||
'@theme-hope/modules/blog/components/BlogHero': path.resolve(
|
||||
__dirname,
|
||||
'./components/BlogHero.vue',
|
||||
),
|
||||
},
|
||||
|
||||
|
||||
// 和 PWA 一起启用
|
||||
// shouldPrefetch: false,
|
||||
// VuePress 默认会预取页面资源;如后续启用 PWA,可按需显式调整。
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user