-
Notifications
You must be signed in to change notification settings - Fork 2
/
nuxt.config.ts
82 lines (80 loc) · 1.79 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
import { defineNuxtConfig } from "nuxt/config";
import { imagetools } from "vite-imagetools";
export const getProvider = () => {
if ("NETLIFY" in process.env) {
return "ipx";
}
if ("VERCEL" in process.env) {
return "vercel";
}
return "ipx";
};
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
srcDir: "src",
alias: {
"@/": "/src/",
},
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
vite: {
build: {
target: "esnext",
},
resolve: {
alias: {
"@/*": "src/*",
},
},
plugins: [imagetools()],
},
runtimeConfig: {
MONGODB_URI: process.env.MONGODB_URI,
},
modules: [
"@nuxtjs/tailwindcss",
"@nuxtjs/google-fonts",
"@nuxt/image-edge",
"vite-plugin-vue-type-imports/nuxt",
"@kevinmarrec/nuxt-pwa",
],
googleFonts: {
families: {
Poppins: true,
"Bebas Neue": true,
},
},
image: {
//supported providers are currently either vercel or ipx
provider: getProvider(),
dir: "../images",
screens: {
xxxs: 10,
xxs: 240,
xs: 320,
sm: 640,
md: 768,
lg: 1024,
xl: 1280,
"2xl": 1536,
},
},
pwa: {
workbox: {
//set to false if PWA functionality is unwanted
enabled: process.env.NODE_ENV !== "development",
},
},
app: {
layoutTransition: {
name: "layout",
mode: "out-in",
duration: 350,
},
},
css: ["@/assets/css/tailwind.css"],
});