-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
54 lines (53 loc) · 1.38 KB
/
nuxt.config.ts
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
52
53
54
import Components from "unplugin-vue-components/vite";
import IconsResolver from "unplugin-icons/resolver";
import Icons from "unplugin-icons/vite";
import { FileSystemIconLoader } from "unplugin-icons/loaders";
export default defineNuxtConfig({
app: {
head: {
title: "Martin's Advent Of Vue 2022",
link: [
{
rel: "stylesheet",
href: "https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined",
},
],
},
},
css: ["@/assets/scss/main.scss"],
tailwindcss: {
cssPath: "@/assets/scss/main.scss",
viewer: false,
},
modules: [
"vite-plugin-vue-type-imports/nuxt",
"@nuxtjs/tailwindcss",
"@vueuse/nuxt",
],
vite: {
plugins: [
Components({
resolvers: [
IconsResolver({
prefix: false,
customCollections: ["icons"],
}),
],
dts: true,
}),
Icons({
customCollections: {
icons: FileSystemIconLoader("./icons", (svg) => {
const viewBox = /viewBox="\d+ \d+ (\d+) (\d+)"/gi.exec(svg);
if (!viewBox) return svg;
const w = viewBox?.[1];
const h = viewBox?.[2];
svg = svg.replace(/width=".*?"/, `width="${w}" `);
svg = svg.replace(/height=".*?"/, `height="${h}" `);
return svg;
}),
},
}),
],
},
});