-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild-options.d.ts
75 lines (75 loc) · 2.6 KB
/
build-options.d.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
/**
* @license
* Copyright Google LLC 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.dev/license
*/
import type { ParsedConfiguration } from '@angular/compiler-cli';
import { logging } from '@angular-devkit/core';
import { AssetPatternClass, Budget, CrossOrigin, I18NTranslation, IndexUnion, InlineStyleLanguage, Localize, OutputHashing, ScriptElement, SourceMapClass, StyleElement } from '../builders/browser/schema';
import { Schema as DevServerSchema } from '../builders/dev-server/schema';
import { NormalizedCachedOptions } from './normalize-cache';
import { NormalizedFileReplacement } from './normalize-file-replacements';
import { NormalizedOptimizationOptions } from './normalize-optimization';
export interface BuildOptions {
optimization: NormalizedOptimizationOptions;
environment?: string;
outputPath: string;
resourcesOutputPath?: string;
aot?: boolean;
sourceMap: SourceMapClass;
vendorChunk?: boolean;
commonChunk?: boolean;
baseHref?: string;
deployUrl?: string;
verbose?: boolean;
progress?: boolean;
localize?: Localize;
i18nMissingTranslation?: I18NTranslation;
externalDependencies?: string[];
watch?: boolean;
outputHashing?: OutputHashing;
poll?: number;
index?: IndexUnion;
deleteOutputPath?: boolean;
preserveSymlinks?: boolean;
extractLicenses?: boolean;
buildOptimizer?: boolean;
namedChunks?: boolean;
crossOrigin?: CrossOrigin;
subresourceIntegrity?: boolean;
serviceWorker?: boolean;
webWorkerTsConfig?: string;
statsJson: boolean;
hmr?: boolean;
main: string;
polyfills: string[];
budgets: Budget[];
assets: AssetPatternClass[];
scripts: ScriptElement[];
styles: StyleElement[];
stylePreprocessorOptions?: {
includePaths: string[];
};
platform?: 'browser' | 'server';
fileReplacements: NormalizedFileReplacement[];
inlineStyleLanguage?: InlineStyleLanguage;
allowedCommonJsDependencies?: string[];
cache: NormalizedCachedOptions;
codeCoverage?: boolean;
codeCoverageExclude?: string[];
supportedBrowsers?: string[];
}
export interface WebpackDevServerOptions extends BuildOptions, Omit<DevServerSchema, 'optimization' | 'sourceMap' | 'buildTarget' | 'browserTarget'> {
}
export interface WebpackConfigOptions<T = BuildOptions> {
root: string;
logger: logging.Logger;
projectRoot: string;
sourceRoot?: string;
buildOptions: T;
tsConfig: ParsedConfiguration;
tsConfigPath: string;
projectName: string;
}