-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
76 lines (69 loc) · 1.72 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
import { nodePolyfills } from "vite-plugin-node-polyfills";
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {
head: {
charset: "utf-8",
viewport: "width=device-width, initial-scale=1",
},
pageTransition: { name: "page", mode: "out-in" },
},
build: {
transpile:
process.env.NODE_ENV === "production"
? ["naive-ui", "vueuc", "@css-render/vue3-ssr", "@juggle/resize-observer"]
: ["@juggle/resize-observer"],
},
imports: {
dirs: ["stores"],
},
modules: [
"@nuxtjs/tailwindcss",
"@nuxtjs/color-mode",
"@nuxtjs/device",
[
"@pinia/nuxt",
{
autoImports: ["defineStore", "acceptHMRUpdate"],
},
],
],
nitro: {
serverAssets: [
{
baseName: "emails",
dir: "./assets/emails",
},
],
},
runtimeConfig: {
ACCESS_TOKEN_SECRET: process.env.ACCESS_TOKEN_SECRET,
MONGODB_DBNAME: process.env.MONGODB_DBNAME,
// These keys are only available server-side
MONGODB_URI: process.env.MONGODB_URI,
public: {
API_BASE_URL: "http://localhost:3000/api",
// These keys are available client-side
BASE_URL: "http://localhost:3000",
},
REFRESH_TOKEN_SECRET: process.env.REFRESH_TOKEN_SECRET,
SENDGRID_API_KEY: process.env.SENDGRID_API_KEY,
},
tailwindcss: {
injectPosition: "first",
},
vite: {
optimizeDeps: {
include:
process.env.NODE_ENV === "development"
? ["naive-ui", "vueuc", "date-fns-tz/esm/formatInTimeZone"]
: [],
},
plugins: [
nodePolyfills({
// Whether to polyfill `node:` protocol imports.
protocolImports: true,
}),
],
},
});