-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
nuxt.config.ts
63 lines (53 loc) · 1.34 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
// Types
import type { NuxtConfig } from "@nuxt/types"
// Base config
import buildModules from "./config/buildModules"
import components from "./config/components"
import generate from "./config/generate"
import css from "./config/css"
import head from "./config/head"
import loading from "./config/loading"
import modules from "./config/modules"
import plugins from "./config/plugins"
import publicRuntimeConfig from "./config/publicRuntimeConfig"
// Specific module options
import vite from "./config/modules/vite"
import feed from "./config/modules/feed"
// Hooks
import { generateDone } from "./hooks/generate/done"
// Constants
const isDev = process.env.NODE_ENV === "development"
const Config: NuxtConfig = {
// Constant options
rootDir: "./",
srcDir: "src",
target: "static",
/*
Disabling server-side rendering on development mode because
Vite module currently doesn't work when SSR is enabled. This
might cause some issues and/or hydration errors but will be
effective enough to help you develop easier.
*/
ssr: !isDev,
// Imported options
head,
loading,
buildModules,
components,
generate,
css,
modules,
plugins,
publicRuntimeConfig,
hooks: {
generate: {
async done(generator) {
await generateDone(generator)
},
},
},
// Modules
vite,
feed,
}
export default Config