-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.js
161 lines (131 loc) · 4.04 KB
/
default.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
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
152
153
154
155
156
157
158
159
160
161
module.exports = {
// The filename of the manifest file. If set to null, not manifest will
// generate.
manifest: 'manifest.json',
less: {
// If set to false, Less compilation will not run
run: false,
// An array of entry Less file paths. Must be strings.
entry: [
'assets/less/style.less',
],
// An array of output CSS file paths. Must match the entry paths.
// Output names can contain: "[hash:20]": a random hash (with a given
// length)
output: [
'web/assets/css/style.[hash:20].css',
],
},
sass: {
// If set to false, Less compilation will not run
run: true,
// An array of entry SASS file paths. Must be strings.
entry: [
'assets/scss/style.scss',
],
// An array of output CSS file paths. Must match the entry paths.
// Output names can contain: "[hash:20]": a random hash (with a given
// length)
output: [
'web/assets/css/style.[hash:20].css',
],
},
js: {
// If set to false, JS compilation will not run
run: true,
// An array of entry JS file paths
// See https://webpack.js.org/configuration/entry-context/#entry for
// supported entries.
entry: {
app: './assets/js/app.js',
},
// An array of output JS file paths. Must match input paths.
// See https://webpack.js.org/configuration/output/
// for supported output configs
output: {
path: process.cwd() + '/web/assets/js',
publicPath: '/assets/js/',
filename: '[name].[hash:20].js',
chunkFilename: 'chunks/[name].[chunkhash].js',
},
// If set to true, JSX will be supported
jsx: false,
// Will be merged with the webpack config, allowing you to add, remove,
// or override any webpack config options.
config: webpack => ({}),
},
ts: {
// If set to false, TS compilation will not run
run: false,
// An array of entry TS file paths
// See https://webpack.js.org/configuration/entry-context/#entry for
// supported entries.
entry: {
app: './assets/ts/app.ts',
},
// An array of output JS file paths. Must match input paths.
// See https://webpack.js.org/configuration/output/
// for supported output configs
output: {
path: process.cwd() + '/web/assets/js',
publicPath: '/assets/js/',
filename: '[name].[hash:20].js',
chunkFilename: 'chunks/[name].[chunkhash].js',
},
// If set to true, TSX will be supported
tsx: false,
// Will be merged with the webpack config, allowing you to add, remove,
// or override any webpack config options.
config: webpack => ({}),
},
critical: {
// If set to false, critical css will not be generated
// (will not run in development)
run: true,
// The base URL of the site to generate critical css from
baseUrl: 'https://dev.site.com',
// The URL of your css (can be array of URLs)
// Use `[file.name]` to get a value from the manifest
// This can be relative to the base URL or an absolute URL
cssUrl: '/assets/css/[style.less]',
// The output directory path for generated critical CSS files
output: 'templates/_critical',
// The critical css files and their associated URIs.
// "_blog-post": "/blog/my-average-post"
paths: {
'index': '/',
},
// An array of CSS selectors (can be regexes) to include in critical, even if not in the viewport
forceInclude: [],
// An array of CSS selectors (can be regexes) to exclude in critical, even if in the viewport
forceExclude: [],
},
browserSync: {
// If set to false, browser sync will not run
// (will not run in production)
run: true,
// The URL browser sync should proxy
proxy: 'https://dev.site.com',
// An array of additional paths to watch
// Starting a path with `!` will make it ignored
watch: [
'templates/**/*',
],
},
copy: {
// If false, copy will not run
run: false,
// The base path that the paths will be copied to
basePath: 'web',
// The paths to copy { [from]: [to] }
// [from] is relative to your current working directory
// [to] is relative to `basePath` above
paths: {
'assets/fonts': 'assets/fonts',
},
},
themeKit: {
// If true, will run `theme watch` on your current directory
run: false,
},
};