-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvite.config.js
51 lines (48 loc) · 1.48 KB
/
vite.config.js
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { defineConfig } from "vite";
import Components from "unplugin-vue-components/vite";
import Pages from "vite-plugin-pages";
import generateSitemap from "vite-plugin-pages-sitemap";
import vue from "@vitejs/plugin-vue";
export default defineConfig({
siteName: "vue-d3-dataviz-starter",
resolve: {
alias: [{ find: "@", replacement: "/src" }],
},
css: {
preprocessorOptions: {
scss: {
additionalData: `
@import "src/styles/animations.scss";
@import "src/styles/colors.scss";
@import "src/styles/fonts.scss";
@import "src/styles/layout.scss";
`,
},
},
},
assetsInclude: ["**/*.woff", "**/*.woff2", "**/*.png"],
filenameHashing: false,
plugins: [
vue({
include: [/\.vue$/, /\.md$/], // <--
}),
Components({
// allow auto load markdown components under `./src/components/`
extensions: ["vue", "md"],
// allow auto import and register components used in markdown
customLoaderMatcher: id => id.endsWith(".md"),
}),
Pages({
extensions: ["vue", "md"],
dirs: [{ dir: "src/pages", baseRoute: "" }],
extendRoute(route, parent) {
console.log(route)
},
}),
],
ssgOptions: {
script: "async",
formatting: "minify",
format: "cjs",
},
});