-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
_common.js
93 lines (78 loc) · 1.7 KB
/
_common.js
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
import capitalize from 'lodash/capitalize'
import env from 'std-env'
import { TARGETS } from '@nuxt/utils'
export default () => ({
// Env
dev: Boolean(env.dev),
test: Boolean(env.test),
debug: undefined, // = dev
env: {},
createRequire: undefined,
// Target
target: TARGETS.server,
// Rendering
ssr: true,
// Mode (deprecated)
mode: undefined,
// Modern
modern: undefined,
// Modules
modules: [],
buildModules: [],
_modules: [],
globalName: undefined,
globals: {
id: globalName => `__${globalName}`,
nuxt: globalName => `$${globalName}`,
context: globalName => `__${globalName.toUpperCase()}__`,
pluginPrefix: globalName => globalName,
readyCallback: globalName => `on${capitalize(globalName)}Ready`,
loadedCallback: globalName => `_on${capitalize(globalName)}Loaded`
},
// Server
serverMiddleware: [],
// Dirs and extensions
_nuxtConfigFile: undefined,
srcDir: undefined,
buildDir: '.nuxt',
modulesDir: [
'node_modules'
],
dir: {
assets: 'assets',
app: 'app',
layouts: 'layouts',
middleware: 'middleware',
pages: 'pages',
static: 'static',
store: 'store'
},
extensions: [],
styleExtensions: ['css', 'pcss', 'postcss', 'styl', 'stylus', 'scss', 'sass', 'less'],
alias: {},
// Ignores
ignoreOptions: undefined,
ignorePrefix: '-',
ignore: [
'**/*.test.*',
'**/*.spec.*'
],
// Watch
watch: [],
watchers: {
rewatchOnRawEvents: undefined,
webpack: {
aggregateTimeout: 1000
},
chokidar: {
ignoreInitial: true
}
},
// Editor
editor: undefined,
// Hooks
hooks: null,
// runtimeConfig
privateRuntimeConfig: {},
publicRuntimeConfig: {}
})