-
Notifications
You must be signed in to change notification settings - Fork 65
/
nuxt.config.ts
151 lines (141 loc) · 3.73 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
import vuetify, { transformAssetUrls } from "vite-plugin-vuetify";
// PWA Config
const title = "Vuetify 3 + Nuxt 3 Starter";
const shortTitle = "Vuetify 3 + Nuxt 3 Starter";
const description = "Template to get you up and running with Nuxt 3 & Vuetify 3";
const image = "https://vuetify3nuxt3starter.behonbaker.com/starter.png";
const url = "https://vuetify3nuxt3starter.behonbaker.com/";
const author = "Behon Baker";
const themeColor = "#4f46e5";
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
// import styles
css: ["@/assets/main.scss"],
devtools: { enabled: true },
// enable takeover mode
typescript: { shim: false },
build: { transpile: ["vuetify"] },
// Based on docs found here - https://vuetifyjs.com/en/getting-started/installation/#using-nuxt-3
vite: {
vue: {
template: {
transformAssetUrls,
},
},
},
modules: [
"@vite-pwa/nuxt",
async (options, nuxt) => {
nuxt.hooks.hook("vite:extendConfig", (config) => {
config.plugins ||= [];
config.plugins.push(vuetify());
});
},
],
app: {
head: {
title: "Vuetify 3 + Nuxt 3 Starter",
titleTemplate: "%s | Vuetify 3 + Nuxt 3 Starter",
link: [
{ rel: "stylesheet", href: "https://rsms.me/inter/inter.css" },
{ rel: "preconnect", href: "https://rsms.me/" },
{ 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: {
includeAssets: ["favicon.ico", "robots.txt"],
manifest: {
name: shortTitle,
short_name: shortTitle,
description: description,
theme_color: themeColor,
lang: "en",
background_color: "#ffffff",
icons: [
{
src: "/icons/pwa-192x192.png",
sizes: "192x192",
type: "image/png",
purpose: "any",
},
{
src: "/icons/pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
{
src: "/icons/pwa-maskable-192x192.png",
sizes: "192x192",
type: "image/png",
purpose: "maskable",
},
{
src: "/icons/pwa-maskable-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
},
compatibilityDate: "2024-07-15",
});