forked from BayBreezy/vuetify3-nuxt3-sass-customized
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
119 lines (118 loc) · 2.98 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import vuetify from "vite-plugin-vuetify";
// PWA Config
const title = "NuxtJS 3 + Vuetify 3 Customized";
const shortTitle = "NuxtJS 3 + Vuetify 3 Customized";
const description = "Template showing how to customize Vuetify SASS variables in a Nuxt3 webapp";
const image = "https://v3customized.behonbaker.com/screenshot.png";
const url = "https://v3customized.behonbaker.com/";
export default defineNuxtConfig({
// Enable takeover mode for better DX
typescript: { shim: false },
// we have to transpile vuetify
build: { transpile: ["vuetify"] },
// disable sourcemap so the terminal warnings go away
sourcemap: {
client: false,
server: false,
},
// import styles
css: ["vuetify/styles", "@/assets/main.scss"],
modules: [
"@kevinmarrec/nuxt-pwa",
async (options, nuxt) => {
nuxt.hooks.hook("vite:extendConfig", (config) =>
// @ts-ignore
config.plugins.push(
vuetify({
styles: { configFile: "assets/variables.scss" },
})
)
);
},
],
// head config
app: {
head: {
title,
link: [
{ rel: "preconnect", href: "https://rsms.me/" },
{ rel: "stylesheet", href: "https://rsms.me/inter/inter.css" },
{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" },
{
rel: "canonical",
href: url,
},
],
meta: [
{
hid: "description",
name: "description",
content: description,
},
{ property: "og:site_name", content: title },
{ hid: "og:type", property: "og:type", content: "website" },
{
hid: "og:url",
property: "og:url",
content: url,
},
{
hid: "og:image:secure_url",
property: "og:image:secure_url",
content: image,
},
{
hid: "og:title",
property: "og:title",
content: title,
},
{
hid: "og:description",
property: "og:description",
content: description,
},
{
hid: "og:image",
property: "og:image",
content: image,
},
//Twitter
{ name: "twitter:card", content: "summary_large_image" },
{
hid: "twitter:url",
name: "twitter:url",
content: url,
},
{
hid: "twitter:title",
name: "twitter:title",
content: title,
},
{
hid: "twitter:description",
name: "twitter:description",
content: description,
},
{
hid: "twitter:image",
name: "twitter:image",
content: image,
},
],
},
},
pwa: {
meta: {
name: shortTitle,
author: "Behon Baker",
theme_color: "#4f46e5",
description: description,
},
manifest: {
name: shortTitle,
short_name: shortTitle,
theme_color: "#4f46e5",
description: description,
},
},
});