@angular-devkit/build-angular 13.0.2 → 13.1.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +30 -30
- package/src/builders/browser/index.js +4 -7
- package/src/builders/dev-server/index.js +0 -4
- package/src/builders/extract-i18n/index.js +1 -4
- package/src/builders/karma/index.d.ts +2 -2
- package/src/builders/karma/index.js +1 -7
- package/src/builders/server/index.js +1 -7
- package/src/utils/build-options.d.ts +1 -2
- package/src/utils/i18n-inlining.js +18 -2
- package/src/utils/index.d.ts +0 -1
- package/src/utils/index.js +0 -1
- package/src/utils/normalize-builder-schema.js +2 -0
- package/src/{webpack/configs/worker.d.ts → utils/supported-browsers.d.ts} +1 -3
- package/src/utils/supported-browsers.js +26 -0
- package/src/webpack/configs/common.d.ts +2 -2
- package/src/webpack/configs/common.js +132 -158
- package/src/webpack/configs/dev-server.d.ts +2 -2
- package/src/webpack/configs/dev-server.js +74 -19
- package/src/webpack/configs/index.d.ts +0 -6
- package/src/webpack/configs/index.js +0 -6
- package/src/webpack/configs/styles.d.ts +2 -2
- package/src/webpack/configs/styles.js +2 -4
- package/src/webpack/plugins/index.d.ts +2 -0
- package/src/webpack/plugins/index.js +5 -1
- package/src/webpack/plugins/json-stats-plugin.d.ts +13 -0
- package/src/webpack/plugins/json-stats-plugin.js +54 -0
- package/src/webpack/plugins/progress-plugin.d.ts +11 -0
- package/src/webpack/plugins/progress-plugin.js +38 -0
- package/src/webpack/plugins/transfer-size-plugin.d.ts +12 -0
- package/src/webpack/plugins/transfer-size-plugin.js +47 -0
- package/src/webpack/{configs/browser.d.ts → plugins/typescript.d.ts} +2 -2
- package/src/webpack/{configs → plugins}/typescript.js +5 -24
- package/src/webpack/utils/helpers.d.ts +15 -5
- package/src/webpack/utils/helpers.js +159 -34
- package/src/webpack/utils/stats.d.ts +8 -2
- package/src/webpack/utils/stats.js +66 -21
- package/src/utils/build-browser-features.d.ts +0 -16
- package/src/utils/build-browser-features.js +0 -54
- package/src/webpack/configs/browser.js +0 -81
- package/src/webpack/configs/server.d.ts +0 -14
- package/src/webpack/configs/server.js +0 -73
- package/src/webpack/configs/stats.d.ts +0 -38
- package/src/webpack/configs/stats.js +0 -53
- package/src/webpack/configs/test.d.ts +0 -10
- package/src/webpack/configs/test.js +0 -77
- package/src/webpack/configs/typescript.d.ts +0 -12
- package/src/webpack/configs/worker.js +0 -22
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "13.0.2",
|
|
3
|
+
"version": "13.1.0-next.2",
|
|
4
4
|
"description": "Angular Webpack Build Facade",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
7
7
|
"builders": "builders.json",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@ampproject/remapping": "1.0.1",
|
|
10
|
-
"@angular-devkit/architect": "0.
|
|
11
|
-
"@angular-devkit/build-webpack": "0.
|
|
12
|
-
"@angular-devkit/core": "13.0.2",
|
|
13
|
-
"@babel/core": "7.
|
|
14
|
-
"@babel/generator": "7.
|
|
15
|
-
"@babel/helper-annotate-as-pure": "7.
|
|
16
|
-
"@babel/plugin-proposal-async-generator-functions": "7.
|
|
17
|
-
"@babel/plugin-transform-async-to-generator": "7.
|
|
18
|
-
"@babel/plugin-transform-runtime": "7.
|
|
19
|
-
"@babel/preset-env": "7.
|
|
20
|
-
"@babel/runtime": "7.
|
|
21
|
-
"@babel/template": "7.
|
|
10
|
+
"@angular-devkit/architect": "0.1301.0-next.2",
|
|
11
|
+
"@angular-devkit/build-webpack": "0.1301.0-next.2",
|
|
12
|
+
"@angular-devkit/core": "13.1.0-next.2",
|
|
13
|
+
"@babel/core": "7.16.0",
|
|
14
|
+
"@babel/generator": "7.16.0",
|
|
15
|
+
"@babel/helper-annotate-as-pure": "7.16.0",
|
|
16
|
+
"@babel/plugin-proposal-async-generator-functions": "7.16.4",
|
|
17
|
+
"@babel/plugin-transform-async-to-generator": "7.16.0",
|
|
18
|
+
"@babel/plugin-transform-runtime": "7.16.4",
|
|
19
|
+
"@babel/preset-env": "7.16.4",
|
|
20
|
+
"@babel/runtime": "7.16.3",
|
|
21
|
+
"@babel/template": "7.16.0",
|
|
22
22
|
"@discoveryjs/json-ext": "0.5.5",
|
|
23
|
-
"@ngtools/webpack": "13.0.2",
|
|
23
|
+
"@ngtools/webpack": "13.1.0-next.2",
|
|
24
24
|
"ansi-colors": "4.1.1",
|
|
25
25
|
"babel-loader": "8.2.3",
|
|
26
26
|
"babel-plugin-istanbul": "6.1.1",
|
|
27
27
|
"browserslist": "^4.9.1",
|
|
28
28
|
"cacache": "15.3.0",
|
|
29
|
-
"caniuse-lite": "^1.0.30001032",
|
|
30
29
|
"circular-dependency-plugin": "5.2.2",
|
|
31
|
-
"copy-webpack-plugin": "9.0
|
|
32
|
-
"core-js": "3.19.
|
|
30
|
+
"copy-webpack-plugin": "9.1.0",
|
|
31
|
+
"core-js": "3.19.1",
|
|
33
32
|
"critters": "0.0.14",
|
|
34
|
-
"css-loader": "6.5.
|
|
35
|
-
"esbuild-wasm": "0.13.
|
|
33
|
+
"css-loader": "6.5.1",
|
|
34
|
+
"esbuild-wasm": "0.13.14",
|
|
36
35
|
"glob": "7.2.0",
|
|
37
36
|
"https-proxy-agent": "5.0.0",
|
|
38
37
|
"inquirer": "8.2.0",
|
|
38
|
+
"jsonc-parser": "3.0.0",
|
|
39
39
|
"karma-source-map-support": "1.4.0",
|
|
40
40
|
"less": "4.1.2",
|
|
41
41
|
"less-loader": "10.2.0",
|
|
42
|
-
"license-webpack-plugin": "
|
|
43
|
-
"loader-utils": "3.
|
|
44
|
-
"mini-css-extract-plugin": "2.4.
|
|
42
|
+
"license-webpack-plugin": "4.0.0",
|
|
43
|
+
"loader-utils": "3.2.0",
|
|
44
|
+
"mini-css-extract-plugin": "2.4.4",
|
|
45
45
|
"minimatch": "3.0.4",
|
|
46
46
|
"open": "8.4.0",
|
|
47
47
|
"ora": "5.4.1",
|
|
@@ -61,25 +61,25 @@
|
|
|
61
61
|
"source-map-support": "0.5.20",
|
|
62
62
|
"stylus": "0.55.0",
|
|
63
63
|
"stylus-loader": "6.2.0",
|
|
64
|
-
"terser": "5.
|
|
64
|
+
"terser": "5.10.0",
|
|
65
65
|
"text-table": "0.2.0",
|
|
66
66
|
"tree-kill": "1.2.2",
|
|
67
67
|
"tslib": "2.3.1",
|
|
68
|
-
"webpack": "5.
|
|
68
|
+
"webpack": "5.64.1",
|
|
69
69
|
"webpack-dev-middleware": "5.2.1",
|
|
70
|
-
"webpack-dev-server": "4.
|
|
70
|
+
"webpack-dev-server": "4.5.0",
|
|
71
71
|
"webpack-merge": "5.8.0",
|
|
72
72
|
"webpack-subresource-integrity": "5.0.0"
|
|
73
73
|
},
|
|
74
74
|
"optionalDependencies": {
|
|
75
|
-
"esbuild": "0.13.
|
|
75
|
+
"esbuild": "0.13.14"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@angular/compiler-cli": "^13.0.0",
|
|
79
|
-
"@angular/localize": "^13.0.0",
|
|
80
|
-
"@angular/service-worker": "^13.0.0",
|
|
78
|
+
"@angular/compiler-cli": "^13.0.0 || ^13.1.0-next",
|
|
79
|
+
"@angular/localize": "^13.0.0 || ^13.1.0-next",
|
|
80
|
+
"@angular/service-worker": "^13.0.0 || ^13.1.0-next",
|
|
81
81
|
"karma": "^6.3.0",
|
|
82
|
-
"ng-packagr": "^13.0.0",
|
|
82
|
+
"ng-packagr": "^13.0.0 || ^13.1.0-next",
|
|
83
83
|
"protractor": "^7.0.0",
|
|
84
84
|
"tailwindcss": "^2.0.0",
|
|
85
85
|
"typescript": "~4.4.3"
|
|
@@ -46,6 +46,7 @@ const output_paths_1 = require("../../utils/output-paths");
|
|
|
46
46
|
const package_chunk_sort_1 = require("../../utils/package-chunk-sort");
|
|
47
47
|
const service_worker_1 = require("../../utils/service-worker");
|
|
48
48
|
const spinner_1 = require("../../utils/spinner");
|
|
49
|
+
const supported_browsers_1 = require("../../utils/supported-browsers");
|
|
49
50
|
const version_1 = require("../../utils/version");
|
|
50
51
|
const webpack_browser_config_1 = require("../../utils/webpack-browser-config");
|
|
51
52
|
const configs_1 = require("../../webpack/configs");
|
|
@@ -59,12 +60,8 @@ async function initialize(options, context, webpackConfigurationTransform) {
|
|
|
59
60
|
const adjustedOptions = options.watch ? options : { ...options, assets: [] };
|
|
60
61
|
const { config, projectRoot, projectSourceRoot, i18n, target } = await (0, webpack_browser_config_1.generateI18nBrowserWebpackConfigFromContext)(adjustedOptions, context, (wco) => [
|
|
61
62
|
(0, configs_1.getCommonConfig)(wco),
|
|
62
|
-
(0, configs_1.getBrowserConfig)(wco),
|
|
63
63
|
(0, configs_1.getStylesConfig)(wco),
|
|
64
|
-
(0, configs_1.getStatsConfig)(wco),
|
|
65
64
|
(0, configs_1.getAnalyticsConfig)(wco, context),
|
|
66
|
-
(0, configs_1.getTypeScriptConfig)(wco),
|
|
67
|
-
wco.buildOptions.webWorkerTsConfig ? (0, configs_1.getWorkerConfig)(wco) : {},
|
|
68
65
|
]);
|
|
69
66
|
// Validate asset option values if processed directly
|
|
70
67
|
if (((_a = options.assets) === null || _a === void 0 ? void 0 : _a.length) && !((_b = adjustedOptions.assets) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
@@ -101,8 +98,7 @@ function buildWebpackBrowser(options, context, transforms = {}) {
|
|
|
101
98
|
return (0, rxjs_1.from)(context.getProjectMetadata(projectName)).pipe((0, operators_1.switchMap)(async (projectMetadata) => {
|
|
102
99
|
var _a;
|
|
103
100
|
const sysProjectRoot = (0, core_1.getSystemPath)((0, core_1.resolve)((0, core_1.normalize)(context.workspaceRoot), (0, core_1.normalize)((_a = projectMetadata.root) !== null && _a !== void 0 ? _a : '')));
|
|
104
|
-
|
|
105
|
-
checkInternetExplorerSupport(buildBrowserFeatures.supportedBrowsers, context.logger);
|
|
101
|
+
checkInternetExplorerSupport(sysProjectRoot, context.logger);
|
|
106
102
|
return {
|
|
107
103
|
...(await initialize(options, context, transforms.webpackConfiguration)),
|
|
108
104
|
cacheOptions: (0, normalize_cache_1.normalizeCacheOptions)(projectMetadata, context.workspaceRoot),
|
|
@@ -294,7 +290,8 @@ function mapEmittedFilesToFileInfo(files = []) {
|
|
|
294
290
|
}
|
|
295
291
|
return filteredFiles;
|
|
296
292
|
}
|
|
297
|
-
function checkInternetExplorerSupport(
|
|
293
|
+
function checkInternetExplorerSupport(projectRoot, logger) {
|
|
294
|
+
const supportedBrowsers = (0, supported_browsers_1.getSupportedBrowsers)(projectRoot);
|
|
298
295
|
if (supportedBrowsers.some((b) => b === 'ie 9' || b === 'ie 10' || b === 'ie 11')) {
|
|
299
296
|
logger.warn(`Warning: Support was requested for Internet Explorer in the project's browserslist configuration. ` +
|
|
300
297
|
'Internet Explorer is no longer officially supported.' +
|
|
@@ -124,12 +124,8 @@ function serveWebpackBrowser(options, context, transforms = {}) {
|
|
|
124
124
|
const { config, projectRoot, i18n } = await (0, webpack_browser_config_1.generateI18nBrowserWebpackConfigFromContext)(browserOptions, context, (wco) => [
|
|
125
125
|
(0, configs_1.getDevServerConfig)(wco),
|
|
126
126
|
(0, configs_1.getCommonConfig)(wco),
|
|
127
|
-
(0, configs_1.getBrowserConfig)(wco),
|
|
128
127
|
(0, configs_1.getStylesConfig)(wco),
|
|
129
|
-
(0, configs_1.getStatsConfig)(wco),
|
|
130
128
|
(0, configs_1.getAnalyticsConfig)(wco, context),
|
|
131
|
-
(0, configs_1.getTypeScriptConfig)(wco),
|
|
132
|
-
browserOptions.webWorkerTsConfig ? (0, configs_1.getWorkerConfig)(wco) : {},
|
|
133
129
|
], options);
|
|
134
130
|
if (!config.devServer) {
|
|
135
131
|
throw new Error('Webpack Dev Server configuration was not set.');
|
|
@@ -166,6 +166,7 @@ async function execute(options, context, transforms) {
|
|
|
166
166
|
subresourceIntegrity: false,
|
|
167
167
|
outputHashing: schema_1.OutputHashing.None,
|
|
168
168
|
namedChunks: true,
|
|
169
|
+
allowedCommonJsDependencies: undefined,
|
|
169
170
|
};
|
|
170
171
|
const { config, projectRoot } = await (0, webpack_browser_config_1.generateBrowserWebpackConfigFromContext)(builderOptions, context, (wco) => {
|
|
171
172
|
var _a;
|
|
@@ -174,10 +175,6 @@ async function execute(options, context, transforms) {
|
|
|
174
175
|
const partials = [
|
|
175
176
|
{ plugins: [new NoEmitPlugin()] },
|
|
176
177
|
(0, configs_1.getCommonConfig)(wco),
|
|
177
|
-
(0, configs_1.getBrowserConfig)(wco),
|
|
178
|
-
(0, configs_1.getTypeScriptConfig)(wco),
|
|
179
|
-
(0, configs_1.getWorkerConfig)(wco),
|
|
180
|
-
(0, configs_1.getStatsConfig)(wco),
|
|
181
178
|
];
|
|
182
179
|
// Add Ivy application file extractor support
|
|
183
180
|
partials.unshift({
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
9
|
import { ConfigOptions } from 'karma';
|
|
10
10
|
import { Observable } from 'rxjs';
|
|
11
|
-
import
|
|
11
|
+
import { Configuration } from 'webpack';
|
|
12
12
|
import { ExecutionTransformer } from '../../transforms';
|
|
13
13
|
import { Schema as KarmaBuilderOptions } from './schema';
|
|
14
14
|
export declare type KarmaConfigOptions = ConfigOptions & {
|
|
@@ -19,7 +19,7 @@ export declare type KarmaConfigOptions = ConfigOptions & {
|
|
|
19
19
|
* @experimental Direct usage of this function is considered experimental.
|
|
20
20
|
*/
|
|
21
21
|
export declare function execute(options: KarmaBuilderOptions, context: BuilderContext, transforms?: {
|
|
22
|
-
webpackConfiguration?: ExecutionTransformer<
|
|
22
|
+
webpackConfiguration?: ExecutionTransformer<Configuration>;
|
|
23
23
|
karmaOptions?: (options: KarmaConfigOptions) => KarmaConfigOptions;
|
|
24
24
|
}): Observable<BuilderOutput>;
|
|
25
25
|
export { KarmaBuilderOptions };
|
|
@@ -59,13 +59,7 @@ async function initialize(options, context, webpackConfigurationTransformer) {
|
|
|
59
59
|
// https://github.com/webpack/webpack-dev-middleware/blob/698c9ae5e9bb9a013985add6189ff21c1a1ec185/src/index.js#L65
|
|
60
60
|
// https://github.com/webpack/webpack/blob/cde1b73e12eb8a77eb9ba42e7920c9ec5d29c2c9/lib/Compiler.js#L379-L388
|
|
61
61
|
watch: true,
|
|
62
|
-
}, context, (wco) => [
|
|
63
|
-
(0, configs_1.getCommonConfig)(wco),
|
|
64
|
-
(0, configs_1.getStylesConfig)(wco),
|
|
65
|
-
(0, configs_1.getTypeScriptConfig)(wco),
|
|
66
|
-
(0, configs_1.getTestConfig)(wco),
|
|
67
|
-
(0, configs_1.getWorkerConfig)(wco),
|
|
68
|
-
]);
|
|
62
|
+
}, context, (wco) => [(0, configs_1.getCommonConfig)(wco), (0, configs_1.getStylesConfig)(wco)]);
|
|
69
63
|
const karma = await Promise.resolve().then(() => __importStar(require('karma')));
|
|
70
64
|
return [
|
|
71
65
|
karma,
|
|
@@ -109,13 +109,7 @@ async function initialize(options, context, webpackConfigurationTransform) {
|
|
|
109
109
|
buildOptimizer: false,
|
|
110
110
|
aot: true,
|
|
111
111
|
platform: 'server',
|
|
112
|
-
}, context, (wco) => [
|
|
113
|
-
(0, configs_1.getCommonConfig)(wco),
|
|
114
|
-
(0, configs_1.getServerConfig)(wco),
|
|
115
|
-
(0, configs_1.getStylesConfig)(wco),
|
|
116
|
-
(0, configs_1.getStatsConfig)(wco),
|
|
117
|
-
(0, configs_1.getTypeScriptConfig)(wco),
|
|
118
|
-
]);
|
|
112
|
+
}, context, (wco) => [(0, configs_1.getCommonConfig)(wco), (0, configs_1.getStylesConfig)(wco)]);
|
|
119
113
|
let transformedConfig;
|
|
120
114
|
if (webpackConfigurationTransform) {
|
|
121
115
|
transformedConfig = await webpackConfigurationTransform(config);
|
|
@@ -59,10 +59,9 @@ export interface BuildOptions {
|
|
|
59
59
|
inlineStyleLanguage?: InlineStyleLanguage;
|
|
60
60
|
allowedCommonJsDependencies?: string[];
|
|
61
61
|
cache: NormalizedCachedOptions;
|
|
62
|
-
}
|
|
63
|
-
export interface WebpackTestOptions extends BuildOptions {
|
|
64
62
|
codeCoverage?: boolean;
|
|
65
63
|
codeCoverageExclude?: string[];
|
|
64
|
+
supportedBrowsers: string[];
|
|
66
65
|
}
|
|
67
66
|
export interface WebpackDevServerOptions extends BuildOptions, Omit<DevServerSchema, 'optimization' | 'sourceMap' | 'browserTarget'> {
|
|
68
67
|
}
|
|
@@ -32,7 +32,7 @@ const path = __importStar(require("path"));
|
|
|
32
32
|
const action_executor_1 = require("./action-executor");
|
|
33
33
|
const copy_assets_1 = require("./copy-assets");
|
|
34
34
|
const spinner_1 = require("./spinner");
|
|
35
|
-
function emittedFilesToInlineOptions(emittedFiles, scriptsEntryPointName, emittedPath, outputPath, es5, missingTranslation) {
|
|
35
|
+
function emittedFilesToInlineOptions(emittedFiles, scriptsEntryPointName, emittedPath, outputPath, es5, missingTranslation, context) {
|
|
36
36
|
const options = [];
|
|
37
37
|
const originalFiles = [];
|
|
38
38
|
for (const emittedFile of emittedFiles) {
|
|
@@ -51,16 +51,31 @@ function emittedFilesToInlineOptions(emittedFiles, scriptsEntryPointName, emitte
|
|
|
51
51
|
setLocale: emittedFile.name === 'main' || emittedFile.name === 'vendor',
|
|
52
52
|
};
|
|
53
53
|
originalFiles.push(originalPath);
|
|
54
|
+
// Remove temporary original file as the content has now been read
|
|
55
|
+
try {
|
|
56
|
+
fs.unlinkSync(originalPath);
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
context.logger.debug(`Unable to delete i18n temporary file [${originalPath}]: ${e.toString()}`);
|
|
60
|
+
}
|
|
54
61
|
try {
|
|
55
62
|
const originalMapPath = originalPath + '.map';
|
|
56
63
|
action.map = fs.readFileSync(originalMapPath, 'utf8');
|
|
57
64
|
originalFiles.push(originalMapPath);
|
|
65
|
+
// Remove temporary original map file as the content has now been read
|
|
66
|
+
try {
|
|
67
|
+
fs.unlinkSync(originalMapPath);
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
context.logger.debug(`Unable to delete i18n temporary file [${originalMapPath}]: ${e.toString()}`);
|
|
71
|
+
}
|
|
58
72
|
}
|
|
59
73
|
catch (err) {
|
|
60
74
|
if (err.code !== 'ENOENT') {
|
|
61
75
|
throw err;
|
|
62
76
|
}
|
|
63
77
|
}
|
|
78
|
+
context.logger.debug(`i18n file queued for processing: ${action.filename}`);
|
|
64
79
|
options.push(action);
|
|
65
80
|
}
|
|
66
81
|
return { options, originalFiles };
|
|
@@ -71,8 +86,9 @@ async function i18nInlineEmittedFiles(context, emittedFiles, i18n, baseOutputPat
|
|
|
71
86
|
const spinner = new spinner_1.Spinner();
|
|
72
87
|
spinner.start('Generating localized bundles...');
|
|
73
88
|
try {
|
|
74
|
-
const { options, originalFiles: processedFiles } = emittedFilesToInlineOptions(emittedFiles, scriptsEntryPointName, emittedPath, baseOutputPath, es5, missingTranslation);
|
|
89
|
+
const { options, originalFiles: processedFiles } = emittedFilesToInlineOptions(emittedFiles, scriptsEntryPointName, emittedPath, baseOutputPath, es5, missingTranslation, context);
|
|
75
90
|
for await (const result of executor.inlineAll(options)) {
|
|
91
|
+
context.logger.debug(`i18n file processed: ${result.file}`);
|
|
76
92
|
for (const diagnostic of result.diagnostics) {
|
|
77
93
|
spinner.stop();
|
|
78
94
|
if (diagnostic.type === 'error') {
|
package/src/utils/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
export * from './build-browser-features';
|
|
9
8
|
export * from './default-progress';
|
|
10
9
|
export * from './delete-output-dir';
|
|
11
10
|
export * from './run-module-as-observable-fork';
|
package/src/utils/index.js
CHANGED
|
@@ -17,7 +17,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
17
17
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
__exportStar(require("./build-browser-features"), exports);
|
|
21
20
|
__exportStar(require("./default-progress"), exports);
|
|
22
21
|
__exportStar(require("./delete-output-dir"), exports);
|
|
23
22
|
__exportStar(require("./run-module-as-observable-fork"), exports);
|
|
@@ -14,6 +14,7 @@ const normalize_cache_1 = require("./normalize-cache");
|
|
|
14
14
|
const normalize_file_replacements_1 = require("./normalize-file-replacements");
|
|
15
15
|
const normalize_optimization_1 = require("./normalize-optimization");
|
|
16
16
|
const normalize_source_maps_1 = require("./normalize-source-maps");
|
|
17
|
+
const supported_browsers_1 = require("./supported-browsers");
|
|
17
18
|
function normalizeBrowserSchema(root, projectRoot, sourceRoot, options, metadata) {
|
|
18
19
|
const normalizedSourceMapOptions = (0, normalize_source_maps_1.normalizeSourceMaps)(options.sourceMap || false);
|
|
19
20
|
return {
|
|
@@ -37,6 +38,7 @@ function normalizeBrowserSchema(root, projectRoot, sourceRoot, options, metadata
|
|
|
37
38
|
// A value of 0 is falsy and will disable polling rather then enable
|
|
38
39
|
// 500 ms is a sensible default in this case
|
|
39
40
|
poll: options.poll === 0 ? 500 : options.poll,
|
|
41
|
+
supportedBrowsers: (0, supported_browsers_1.getSupportedBrowsers)((0, core_1.getSystemPath)(projectRoot)),
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
44
|
exports.normalizeBrowserSchema = normalizeBrowserSchema;
|
|
@@ -5,6 +5,4 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import { WebpackConfigOptions } from '../../utils/build-options';
|
|
10
|
-
export declare function getWorkerConfig(wco: WebpackConfigOptions): Configuration;
|
|
8
|
+
export declare function getSupportedBrowsers(projectRoot: string): string[];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.io/license
|
|
8
|
+
*/
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.getSupportedBrowsers = void 0;
|
|
14
|
+
const browserslist_1 = __importDefault(require("browserslist"));
|
|
15
|
+
function getSupportedBrowsers(projectRoot) {
|
|
16
|
+
browserslist_1.default.defaults = [
|
|
17
|
+
'last 1 Chrome version',
|
|
18
|
+
'last 1 Firefox version',
|
|
19
|
+
'last 2 Edge major versions',
|
|
20
|
+
'last 2 Safari major versions',
|
|
21
|
+
'last 2 iOS major versions',
|
|
22
|
+
'Firefox ESR',
|
|
23
|
+
];
|
|
24
|
+
return (0, browserslist_1.default)(undefined, { path: projectRoot });
|
|
25
|
+
}
|
|
26
|
+
exports.getSupportedBrowsers = getSupportedBrowsers;
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import { Configuration } from 'webpack';
|
|
9
|
-
import { WebpackConfigOptions
|
|
10
|
-
export declare function getCommonConfig(wco: WebpackConfigOptions
|
|
9
|
+
import { WebpackConfigOptions } from '../../utils/build-options';
|
|
10
|
+
export declare function getCommonConfig(wco: WebpackConfigOptions): Promise<Configuration>;
|