@angular-devkit/build-angular 13.2.0-next.0 → 13.2.0-rc.1
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 +37 -37
- package/src/babel/webpack-loader.js +2 -1
- package/src/builders/browser/index.d.ts +5 -0
- package/src/builders/browser/index.js +9 -1
- package/src/builders/browser/schema.d.ts +8 -2
- package/src/builders/browser/schema.js +9 -7
- package/src/builders/browser/schema.json +6 -0
- package/src/builders/dev-server/index.js +8 -3
- package/src/builders/extract-i18n/index.js +3 -0
- package/src/builders/karma/index.js +3 -0
- package/src/builders/ng-packagr/index.js +3 -0
- package/src/builders/server/index.js +3 -0
- package/src/builders/server/schema.d.ts +8 -2
- package/src/builders/server/schema.js +9 -7
- package/src/builders/server/schema.json +6 -0
- package/src/sass/sass-service.d.ts +3 -3
- package/src/utils/build-options.d.ts +2 -2
- package/src/utils/i18n-inlining.js +0 -14
- package/src/utils/i18n-options.d.ts +2 -2
- package/src/utils/i18n-options.js +40 -13
- package/src/utils/index-file/inline-fonts.js +2 -2
- package/src/utils/normalize-cache.d.ts +4 -0
- package/src/utils/normalize-cache.js +4 -1
- package/src/utils/package-version.d.ts +8 -0
- package/src/utils/package-version.js +11 -0
- package/src/utils/purge-cache.d.ts +10 -0
- package/src/utils/purge-cache.js +41 -0
- package/src/webpack/configs/common.js +11 -10
- package/src/webpack/configs/dev-server.js +26 -14
- package/src/webpack/configs/styles.js +12 -12
- package/src/webpack/plugins/any-component-style-budget-checker.js +4 -0
- package/src/webpack/plugins/javascript-optimizer-plugin.d.ts +14 -6
- package/src/webpack/plugins/javascript-optimizer-plugin.js +5 -4
- package/src/webpack/plugins/javascript-optimizer-worker.d.ts +45 -37
- package/src/webpack/plugins/javascript-optimizer-worker.js +10 -2
- package/src/webpack/plugins/karma/karma.js +2 -2
- package/src/webpack/utils/helpers.js +5 -4
|
@@ -35,18 +35,19 @@ 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 package_version_1 = require("../../utils/package-version");
|
|
38
39
|
function getOutputHashFormat(option, length = 20) {
|
|
39
40
|
const hashFormats = {
|
|
40
41
|
none: { chunk: '', extract: '', file: '', script: '' },
|
|
41
42
|
media: { chunk: '', extract: '', file: `.[hash:${length}]`, script: '' },
|
|
42
43
|
bundles: {
|
|
43
|
-
chunk: `.[
|
|
44
|
+
chunk: `.[contenthash:${length}]`,
|
|
44
45
|
extract: `.[contenthash:${length}]`,
|
|
45
46
|
file: '',
|
|
46
47
|
script: `.[hash:${length}]`,
|
|
47
48
|
},
|
|
48
49
|
all: {
|
|
49
|
-
chunk: `.[
|
|
50
|
+
chunk: `.[contenthash:${length}]`,
|
|
50
51
|
extract: `.[contenthash:${length}]`,
|
|
51
52
|
file: `.[hash:${length}]`,
|
|
52
53
|
script: `.[hash:${length}]`,
|
|
@@ -113,9 +114,9 @@ exports.getInstrumentationExcludedPaths = getInstrumentationExcludedPaths;
|
|
|
113
114
|
function getCacheSettings(wco, angularVersion) {
|
|
114
115
|
const { enabled, path: cacheDirectory } = wco.buildOptions.cache;
|
|
115
116
|
if (enabled) {
|
|
116
|
-
const packageVersion = require('../../../package.json').version;
|
|
117
117
|
return {
|
|
118
118
|
type: 'filesystem',
|
|
119
|
+
profile: wco.buildOptions.verbose,
|
|
119
120
|
cacheDirectory: path.join(cacheDirectory, 'angular-webpack'),
|
|
120
121
|
maxMemoryGenerations: 1,
|
|
121
122
|
// We use the versions and build options as the cache name. The Webpack configurations are too
|
|
@@ -123,7 +124,7 @@ function getCacheSettings(wco, angularVersion) {
|
|
|
123
124
|
// None of which are "named".
|
|
124
125
|
name: (0, crypto_1.createHash)('sha1')
|
|
125
126
|
.update(angularVersion)
|
|
126
|
-
.update(
|
|
127
|
+
.update(package_version_1.VERSION)
|
|
127
128
|
.update(wco.projectRoot)
|
|
128
129
|
.update(JSON.stringify(wco.tsConfig))
|
|
129
130
|
.update(JSON.stringify({
|