@angular-devkit/build-angular 13.2.1 → 13.2.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
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.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.1.1",
|
|
10
|
-
"@angular-devkit/architect": "0.1302.
|
|
11
|
-
"@angular-devkit/build-webpack": "0.1302.
|
|
12
|
-
"@angular-devkit/core": "13.2.
|
|
10
|
+
"@angular-devkit/architect": "0.1302.2",
|
|
11
|
+
"@angular-devkit/build-webpack": "0.1302.2",
|
|
12
|
+
"@angular-devkit/core": "13.2.2",
|
|
13
13
|
"@babel/core": "7.16.12",
|
|
14
14
|
"@babel/generator": "7.16.8",
|
|
15
15
|
"@babel/helper-annotate-as-pure": "7.16.7",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@babel/runtime": "7.16.7",
|
|
21
21
|
"@babel/template": "7.16.7",
|
|
22
22
|
"@discoveryjs/json-ext": "0.5.6",
|
|
23
|
-
"@ngtools/webpack": "13.2.
|
|
23
|
+
"@ngtools/webpack": "13.2.2",
|
|
24
24
|
"ansi-colors": "4.1.1",
|
|
25
25
|
"babel-loader": "8.2.3",
|
|
26
26
|
"babel-plugin-istanbul": "6.1.1",
|
|
@@ -39,7 +39,7 @@
|
|
|
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": "4.0.
|
|
42
|
+
"license-webpack-plugin": "4.0.1",
|
|
43
43
|
"loader-utils": "3.2.0",
|
|
44
44
|
"mini-css-extract-plugin": "2.5.3",
|
|
45
45
|
"minimatch": "3.0.4",
|
|
@@ -28,7 +28,7 @@ export interface Schema {
|
|
|
28
28
|
* - when a path to directory is provided, all spec files ending ".spec.@(ts|tsx)" will be
|
|
29
29
|
* included
|
|
30
30
|
* - when a path to a file is provided, and a matching spec file exists it will be included
|
|
31
|
-
* instead
|
|
31
|
+
* instead.
|
|
32
32
|
*/
|
|
33
33
|
include?: string[];
|
|
34
34
|
/**
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"items": {
|
|
71
71
|
"type": "string"
|
|
72
72
|
},
|
|
73
|
-
"description": "Globs of files to include, relative to workspace or project root. \nThere are 2 special cases:\n - when a path to directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists it will be included instead"
|
|
73
|
+
"description": "Globs of files to include, relative to workspace or project root. \nThere are 2 special cases:\n - when a path to directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists it will be included instead."
|
|
74
74
|
},
|
|
75
75
|
"sourceMap": {
|
|
76
76
|
"description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { logging } from '@angular-devkit/core';
|
|
9
9
|
import type { ParsedConfiguration } from '@angular/compiler-cli';
|
|
10
|
-
import { AssetPatternClass, Budget, CrossOrigin, ExtraEntryPoint, I18NTranslation, IndexUnion, InlineStyleLanguage, Localize, SourceMapClass } from '../builders/browser/schema';
|
|
10
|
+
import { AssetPatternClass, Budget, CrossOrigin, ExtraEntryPoint, I18NTranslation, IndexUnion, InlineStyleLanguage, Localize, OutputHashing, SourceMapClass } from '../builders/browser/schema';
|
|
11
11
|
import { Schema as DevServerSchema } from '../builders/dev-server/schema';
|
|
12
12
|
import { NormalizedCachedOptions } from './normalize-cache';
|
|
13
13
|
import { NormalizedFileReplacement } from './normalize-file-replacements';
|
|
@@ -30,7 +30,7 @@ export interface BuildOptions {
|
|
|
30
30
|
bundleDependencies?: boolean;
|
|
31
31
|
externalDependencies?: string[];
|
|
32
32
|
watch?: boolean;
|
|
33
|
-
outputHashing?:
|
|
33
|
+
outputHashing?: OutputHashing;
|
|
34
34
|
poll?: number;
|
|
35
35
|
index?: IndexUnion;
|
|
36
36
|
deleteOutputPath?: boolean;
|
|
@@ -58,7 +58,7 @@ async function getCommonConfig(wco) {
|
|
|
58
58
|
// changed to a direct dynamic import.
|
|
59
59
|
const { GLOBAL_DEFS_FOR_TERSER, GLOBAL_DEFS_FOR_TERSER_WITH_AOT, VERSION: NG_VERSION, } = await (0, load_esm_1.loadEsmModule)('@angular/compiler-cli');
|
|
60
60
|
// determine hashing format
|
|
61
|
-
const hashFormat = (0, helpers_1.getOutputHashFormat)(buildOptions.outputHashing
|
|
61
|
+
const hashFormat = (0, helpers_1.getOutputHashFormat)(buildOptions.outputHashing);
|
|
62
62
|
if (buildOptions.progress) {
|
|
63
63
|
extraPlugins.push(new progress_plugin_1.ProgressPlugin(platform));
|
|
64
64
|
}
|
|
@@ -298,7 +298,9 @@ async function getCommonConfig(wco) {
|
|
|
298
298
|
test: /\.[cm]?[tj]sx?$/,
|
|
299
299
|
// The below is needed due to a bug in `@babel/runtime`. See: https://github.com/babel/babel/issues/12824
|
|
300
300
|
resolve: { fullySpecified: false },
|
|
301
|
-
exclude: [
|
|
301
|
+
exclude: [
|
|
302
|
+
/[/\\](?:core-js|@babel|tslib|web-animations-js|web-streams-polyfill|whatwg-url)[/\\]/,
|
|
303
|
+
],
|
|
302
304
|
use: [
|
|
303
305
|
{
|
|
304
306
|
loader: require.resolve('../../babel/webpack-loader'),
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import type { ObjectPattern } from 'copy-webpack-plugin';
|
|
9
9
|
import { ScriptTarget } from 'typescript';
|
|
10
10
|
import type { Configuration, WebpackOptionsNormalized } from 'webpack';
|
|
11
|
-
import { AssetPatternClass, ExtraEntryPoint, ExtraEntryPointClass } from '../../builders/browser/schema';
|
|
11
|
+
import { AssetPatternClass, ExtraEntryPoint, ExtraEntryPointClass, OutputHashing } from '../../builders/browser/schema';
|
|
12
12
|
import { WebpackConfigOptions } from '../../utils/build-options';
|
|
13
13
|
export interface HashFormat {
|
|
14
14
|
chunk: string;
|
|
@@ -16,7 +16,7 @@ export interface HashFormat {
|
|
|
16
16
|
file: string;
|
|
17
17
|
script: string;
|
|
18
18
|
}
|
|
19
|
-
export declare function getOutputHashFormat(
|
|
19
|
+
export declare function getOutputHashFormat(outputHashing?: OutputHashing, length?: number): HashFormat;
|
|
20
20
|
export declare type NormalizedEntryPoint = Required<ExtraEntryPointClass>;
|
|
21
21
|
export declare function normalizeExtraEntryPoints(extraEntryPoints: ExtraEntryPoint[], defaultBundleName: string): NormalizedEntryPoint[];
|
|
22
22
|
export declare function assetNameTemplateFactory(hashFormat: HashFormat): (resourcePath: string) => string;
|
|
@@ -35,25 +35,41 @@ const fs_1 = require("fs");
|
|
|
35
35
|
const glob_1 = __importDefault(require("glob"));
|
|
36
36
|
const path = __importStar(require("path"));
|
|
37
37
|
const typescript_1 = require("typescript");
|
|
38
|
+
const schema_1 = require("../../builders/browser/schema");
|
|
38
39
|
const package_version_1 = require("../../utils/package-version");
|
|
39
|
-
function getOutputHashFormat(
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
40
|
+
function getOutputHashFormat(outputHashing = schema_1.OutputHashing.None, length = 20) {
|
|
41
|
+
const hashTemplate = `.[contenthash:${length}]`;
|
|
42
|
+
switch (outputHashing) {
|
|
43
|
+
case 'media':
|
|
44
|
+
return {
|
|
45
|
+
chunk: '',
|
|
46
|
+
extract: '',
|
|
47
|
+
file: hashTemplate,
|
|
48
|
+
script: '',
|
|
49
|
+
};
|
|
50
|
+
case 'bundles':
|
|
51
|
+
return {
|
|
52
|
+
chunk: hashTemplate,
|
|
53
|
+
extract: hashTemplate,
|
|
54
|
+
file: '',
|
|
55
|
+
script: hashTemplate,
|
|
56
|
+
};
|
|
57
|
+
case 'all':
|
|
58
|
+
return {
|
|
59
|
+
chunk: hashTemplate,
|
|
60
|
+
extract: hashTemplate,
|
|
61
|
+
file: hashTemplate,
|
|
62
|
+
script: hashTemplate,
|
|
63
|
+
};
|
|
64
|
+
case 'none':
|
|
65
|
+
default:
|
|
66
|
+
return {
|
|
67
|
+
chunk: '',
|
|
68
|
+
extract: '',
|
|
69
|
+
file: '',
|
|
70
|
+
script: '',
|
|
71
|
+
};
|
|
72
|
+
}
|
|
57
73
|
}
|
|
58
74
|
exports.getOutputHashFormat = getOutputHashFormat;
|
|
59
75
|
function normalizeExtraEntryPoints(extraEntryPoints, defaultBundleName) {
|