-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvite.config.ts
More file actions
30 lines (27 loc) · 883 Bytes
/
vite.config.ts
File metadata and controls
30 lines (27 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// import preact from '@preact/preset-vite';
import { resolve } from "path";
import { defineConfig } from "vite";
import hugoPlugin from "vite-hugo-plugin";
// Root directory of our application
const appDir = __dirname;
// The directory where hugo builds it's files.
const hugoOutDir = resolve(appDir, "public");
const ignoreHTMLFiles = [];
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
// preact(), // Specify preact plugin, we will need that later
hugoPlugin({ appDir, hugoOutDir, ignoreHTMLFiles }), // Hugo plugin that configures vite to work with hugo
],
build: {
assetsInlineLimit: 0,
// 在 outDir 中生成 manifest.json
manifest: true,
},
// server: {
// watch: {
// usePolling: true,
// },
// },
});
hugoPlugin({ appDir, hugoOutDir, ignoreHTMLFiles });