forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-options.ts
83 lines (77 loc) · 2.02 KB
/
build-options.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
77
78
79
80
81
82
83
/**
* @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
*/
// TODO: cleanup this file, it's copied as is from Angular CLI.
// tslint:disable-next-line:no-implicit-dependencies
import * as ts from 'typescript';
import {
AssetPatternObject,
Budget,
CurrentFileReplacement,
ExtraEntryPoint,
} from '../../browser/schema';
export interface BuildOptions {
optimization: boolean;
environment?: string;
outputPath: string;
aot?: boolean;
sourceMap?: boolean;
vendorSourceMap?: boolean;
evalSourceMap?: boolean;
vendorChunk?: boolean;
commonChunk?: boolean;
baseHref?: string;
deployUrl?: string;
verbose?: boolean;
progress?: boolean;
i18nFile?: string;
i18nFormat?: string;
i18nLocale?: string;
i18nMissingTranslation?: string;
extractCss?: boolean;
bundleDependencies?: 'none' | 'all';
watch?: boolean;
outputHashing?: string;
poll?: number;
app?: string;
deleteOutputPath?: boolean;
preserveSymlinks?: boolean;
extractLicenses?: boolean;
showCircularDependencies?: boolean;
buildOptimizer?: boolean;
namedChunks?: boolean;
subresourceIntegrity?: boolean;
serviceWorker?: boolean;
skipAppShell?: boolean;
statsJson: boolean;
forkTypeChecker: boolean;
profile?: boolean;
main: string;
index: string;
polyfills?: string;
budgets: Budget[];
assets: AssetPatternObject[];
scripts: ExtraEntryPoint[];
styles: ExtraEntryPoint[];
stylePreprocessorOptions?: { includePaths: string[] };
lazyModules: string[];
platform?: 'browser' | 'server';
fileReplacements: CurrentFileReplacement[];
}
export interface WebpackTestOptions extends BuildOptions {
codeCoverage?: boolean;
codeCoverageExclude?: string[];
}
export interface WebpackConfigOptions<T = BuildOptions> {
root: string;
projectRoot: string;
sourceRoot?: string;
buildOptions: T;
tsConfig: ts.ParsedCommandLine;
tsConfigPath: string;
supportES2015: boolean;
}