-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Expand file tree
/
Copy pathschema.d.ts
More file actions
187 lines (181 loc) · 4.34 KB
/
schema.d.ts
File metadata and controls
187 lines (181 loc) · 4.34 KB
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {
BrowserBuilderSchema,
CurrentFileReplacement,
FileReplacement,
NormalizedOptimization,
NormalizedSourceMaps,
OptimizationObject,
SourceMapOptions,
} from '../browser/schema';
export interface BuildWebpackServerSchema {
/**
* The name of the TypeScript configuration file.
*/
tsConfig: string;
/**
* Adds more details to output logging.
*/
verbose: boolean;
/**
* Use a separate bundle containing code used across multiple bundles.
*/
commonChunk?: boolean;
/**
* URL where files will be deployed.
*/
deployUrl?: string;
/**
* Show circular dependency warnings on builds.
*/
showCircularDependencies?: boolean;
/**
* Use a separate bundle containing only vendor libraries.
*/
vendorChunk?: boolean;
/**
* Output sourcemaps.
*/
sourceMap: SourceMapOptions;
/**
* Resolve vendor packages sourcemaps.
* @deprecated use sourceMap.vendor
*/
vendorSourceMap?: boolean;
/**
* Output in-file eval sourcemaps.
* @deprecated
*/
evalSourceMap?: boolean;
/**
* Path where output will be placed.
*/
outputPath: string;
/**
* Path where style resources will be placed (Relative to outputPath).
*/
resourcesOutputPath: string;
/**
* Generates a 'stats.json' file which can be analyzed using tools such as:
* #webpack-bundle-analyzer' or https://webpack.github.io/analyse.
*/
statsJson?: boolean;
/**
* How to handle missing translations for i18n.
*/
i18nMissingTranslation?: string;
/**
* Available on server platform only. Which external dependencies to bundle into the module.
* By default, all of node_modules will be kept as requires.
*/
bundleDependencies?: BundleDependencies;
/**
* Enables optimization of the build output.
*/
optimization?: OptimizationObject;
/**
* Log progress to the console while building.
*/
progress?: boolean;
/**
* delete-output-path
*/
deleteOutputPath?: boolean;
/**
* List of additional NgModule files that will be lazy loaded. Lazy router modules with be
* discovered automatically.
*/
lazyModules?: string[];
/**
* Replace files with other files in the build.
*/
fileReplacements: FileReplacement[];
/**
* Define the output filename cache-busting hashing mode.
*/
outputHashing?: OutputHashing;
/**
* Extract all licenses in a separate file, in the case of production builds only.
*/
extractLicenses?: boolean;
/**
* Format of the localization file specified with --i18n-file.
*/
i18nFormat?: string;
/**
* Locale to use for i18n.
*/
i18nLocale?: string;
/**
* Run the TypeScript type checker in a forked process.
*/
forkTypeChecker?: boolean;
/**
* The name of the main entry-point file.
*/
main: string;
/**
* Localization file to use for i18n.
*/
i18nFile?: string;
/**
* Options to pass to style preprocessors
*/
stylePreprocessorOptions?: StylePreprocessorOptions;
/**
* Do not use the real path when resolving modules.
*/
preserveSymlinks?: boolean;
/**
* Use file name for lazy loaded chunks.
*/
namedChunks?: boolean;
/**
* Run build when files change.
*/
watch?: boolean;
/**
* Enable and define the file watching poll time period in milliseconds.
*/
poll?: number;
}
/**
* Available on server platform only. Which external dependencies to bundle into the module.
* By default, all of node_modules will be kept as requires.
*/
export enum BundleDependencies {
All = 'all',
None = 'none',
}
/**
* Define the output filename cache-busting hashing mode.
*/
export enum OutputHashing {
All = 'all',
Bundles = 'bundles',
Media = 'media',
None = 'none',
}
/**
* Options to pass to style preprocessors
*/
export interface StylePreprocessorOptions {
/**
* Paths to include. Paths will be resolved to project root.
*/
includePaths?: string[];
}
export interface NormalizedServerBuilderServerSchema extends Pick<
BuildWebpackServerSchema,
Exclude<keyof BuildWebpackServerSchema, 'sourceMap' | 'optimization'>
> {
fileReplacements: CurrentFileReplacement[];
sourceMap: NormalizedSourceMaps;
optimization: NormalizedOptimization;
}