@angular-devkit/build-angular 15.0.0-next.0 → 15.0.0-next.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 +6 -6
- package/src/builders/server/index.js +0 -18
- package/src/builders/server/schema.d.ts +1 -10
- package/src/builders/server/schema.js +1 -6
- package/src/builders/server/schema.json +1 -9
- package/src/webpack/configs/common.js +9 -0
- package/src/webpack/configs/styles.js +6 -8
- package/src/webpack/utils/stats.js +1 -1
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "15.0.0-next.
|
|
3
|
+
"version": "15.0.0-next.1",
|
|
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": "2.2.0",
|
|
10
|
-
"@angular-devkit/architect": "0.1500.0-next.
|
|
11
|
-
"@angular-devkit/build-webpack": "0.1500.0-next.
|
|
12
|
-
"@angular-devkit/core": "15.0.0-next.
|
|
10
|
+
"@angular-devkit/architect": "0.1500.0-next.1",
|
|
11
|
+
"@angular-devkit/build-webpack": "0.1500.0-next.1",
|
|
12
|
+
"@angular-devkit/core": "15.0.0-next.1",
|
|
13
13
|
"@babel/core": "7.19.0",
|
|
14
14
|
"@babel/generator": "7.19.0",
|
|
15
15
|
"@babel/helper-annotate-as-pure": "7.18.6",
|
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
"@babel/runtime": "7.19.0",
|
|
21
21
|
"@babel/template": "7.18.10",
|
|
22
22
|
"@discoveryjs/json-ext": "0.5.7",
|
|
23
|
-
"@ngtools/webpack": "15.0.0-next.
|
|
23
|
+
"@ngtools/webpack": "15.0.0-next.1",
|
|
24
24
|
"ansi-colors": "4.1.3",
|
|
25
|
+
"autoprefixer": "10.4.10",
|
|
25
26
|
"babel-loader": "8.2.5",
|
|
26
27
|
"babel-plugin-istanbul": "6.1.1",
|
|
27
28
|
"browserslist": "^4.9.1",
|
|
@@ -48,7 +49,6 @@
|
|
|
48
49
|
"postcss": "8.4.16",
|
|
49
50
|
"postcss-import": "15.0.0",
|
|
50
51
|
"postcss-loader": "7.0.1",
|
|
51
|
-
"postcss-preset-env": "7.8.1",
|
|
52
52
|
"regenerator-runtime": "0.13.9",
|
|
53
53
|
"resolve-url-loader": "5.0.0",
|
|
54
54
|
"rxjs": "6.6.7",
|
|
@@ -33,7 +33,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
33
33
|
exports.execute = void 0;
|
|
34
34
|
const architect_1 = require("@angular-devkit/architect");
|
|
35
35
|
const build_webpack_1 = require("@angular-devkit/build-webpack");
|
|
36
|
-
const core_1 = require("@angular-devkit/core");
|
|
37
36
|
const path = __importStar(require("path"));
|
|
38
37
|
const rxjs_1 = require("rxjs");
|
|
39
38
|
const operators_1 = require("rxjs/operators");
|
|
@@ -55,23 +54,6 @@ function execute(options, context, transforms = {}) {
|
|
|
55
54
|
(0, version_1.assertCompatibleAngularVersion)(root);
|
|
56
55
|
const baseOutputPath = path.resolve(root, options.outputPath);
|
|
57
56
|
let outputPaths;
|
|
58
|
-
if (typeof options.bundleDependencies === 'string') {
|
|
59
|
-
options.bundleDependencies = options.bundleDependencies === 'all';
|
|
60
|
-
context.logger.warn(`Option 'bundleDependencies' string value is deprecated since version 9. Use a boolean value instead.`);
|
|
61
|
-
}
|
|
62
|
-
if (!options.bundleDependencies) {
|
|
63
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
64
|
-
const { __processed_by_ivy_ngcc__, main = '' } = require('@angular/core/package.json');
|
|
65
|
-
if (!__processed_by_ivy_ngcc__ ||
|
|
66
|
-
!__processed_by_ivy_ngcc__.main ||
|
|
67
|
-
main.includes('__ivy_ngcc__')) {
|
|
68
|
-
context.logger.warn(core_1.tags.stripIndent `
|
|
69
|
-
Warning: Turning off 'bundleDependencies' with Ivy may result in undefined behaviour
|
|
70
|
-
unless 'node_modules' are transformed using the standalone Angular compatibility compiler (NGCC).
|
|
71
|
-
See: https://angular.io/guide/ivy#ivy-and-universal-app-shell
|
|
72
|
-
`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
57
|
return (0, rxjs_1.from)(initialize(options, context, transforms.webpackConfiguration)).pipe((0, operators_1.concatMap)(({ config, i18n, target }) => {
|
|
76
58
|
return (0, build_webpack_1.runWebpack)(config, context, {
|
|
77
59
|
webpackFactory: require('webpack'),
|
|
@@ -3,7 +3,7 @@ export interface Schema {
|
|
|
3
3
|
* Which external dependencies to bundle into the bundle. By default, all of node_modules
|
|
4
4
|
* will be bundled.
|
|
5
5
|
*/
|
|
6
|
-
bundleDependencies?:
|
|
6
|
+
bundleDependencies?: boolean;
|
|
7
7
|
/**
|
|
8
8
|
* Delete the output path before building.
|
|
9
9
|
*/
|
|
@@ -110,15 +110,6 @@ export interface Schema {
|
|
|
110
110
|
*/
|
|
111
111
|
watch?: boolean;
|
|
112
112
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Which external dependencies to bundle into the bundle. By default, all of node_modules
|
|
115
|
-
* will be bundled.
|
|
116
|
-
*/
|
|
117
|
-
export declare type BundleDependenciesUnion = boolean | BundleDependenciesEnum;
|
|
118
|
-
export declare enum BundleDependenciesEnum {
|
|
119
|
-
All = "all",
|
|
120
|
-
None = "none"
|
|
121
|
-
}
|
|
122
113
|
export interface FileReplacement {
|
|
123
114
|
replace?: string;
|
|
124
115
|
replaceWith?: string;
|
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
// THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
|
|
3
3
|
// CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.OutputHashing = exports.InlineStyleLanguage = exports.I18NTranslation =
|
|
6
|
-
var BundleDependenciesEnum;
|
|
7
|
-
(function (BundleDependenciesEnum) {
|
|
8
|
-
BundleDependenciesEnum["All"] = "all";
|
|
9
|
-
BundleDependenciesEnum["None"] = "none";
|
|
10
|
-
})(BundleDependenciesEnum = exports.BundleDependenciesEnum || (exports.BundleDependenciesEnum = {}));
|
|
5
|
+
exports.OutputHashing = exports.InlineStyleLanguage = exports.I18NTranslation = void 0;
|
|
11
6
|
/**
|
|
12
7
|
* How to handle duplicate translations for i18n.
|
|
13
8
|
*
|
|
@@ -184,15 +184,7 @@
|
|
|
184
184
|
"bundleDependencies": {
|
|
185
185
|
"description": "Which external dependencies to bundle into the bundle. By default, all of node_modules will be bundled.",
|
|
186
186
|
"default": true,
|
|
187
|
-
"
|
|
188
|
-
{
|
|
189
|
-
"type": "boolean"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
"type": "string",
|
|
193
|
-
"enum": ["none", "all"]
|
|
194
|
-
}
|
|
195
|
-
]
|
|
187
|
+
"type": "boolean"
|
|
196
188
|
},
|
|
197
189
|
"externalDependencies": {
|
|
198
190
|
"description": "Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime.",
|
|
@@ -253,8 +253,17 @@ async function getCommonConfig(wco) {
|
|
|
253
253
|
watch: buildOptions.watch,
|
|
254
254
|
watchOptions: {
|
|
255
255
|
poll,
|
|
256
|
+
// The below is needed as when preserveSymlinks is enabled we disable `resolve.symlinks`.
|
|
257
|
+
followSymlinks: buildOptions.preserveSymlinks,
|
|
256
258
|
ignored: poll === undefined ? undefined : '**/node_modules/**',
|
|
257
259
|
},
|
|
260
|
+
snapshot: {
|
|
261
|
+
module: {
|
|
262
|
+
// Use hash of content instead of timestamp because the timestamp of the symlink will be used
|
|
263
|
+
// instead of the referenced files which causes changes in symlinks not to be picked up.
|
|
264
|
+
hash: buildOptions.preserveSymlinks,
|
|
265
|
+
},
|
|
266
|
+
},
|
|
258
267
|
performance: {
|
|
259
268
|
hints: false,
|
|
260
269
|
},
|
|
@@ -83,8 +83,6 @@ exports.resolveGlobalStyles = resolveGlobalStyles;
|
|
|
83
83
|
// eslint-disable-next-line max-lines-per-function
|
|
84
84
|
function getStylesConfig(wco) {
|
|
85
85
|
var _a, _b, _c;
|
|
86
|
-
const postcssImports = require('postcss-import');
|
|
87
|
-
const postcssPresetEnv = require('postcss-preset-env');
|
|
88
86
|
const { root, buildOptions } = wco;
|
|
89
87
|
const extraPlugins = [];
|
|
90
88
|
extraPlugins.push(new plugins_1.AnyComponentStyleBudgetChecker(buildOptions.budgets));
|
|
@@ -140,11 +138,8 @@ function getStylesConfig(wco) {
|
|
|
140
138
|
extraPostcssPlugins.push(require(tailwindPackagePath)({ config: tailwindConfigPath }));
|
|
141
139
|
}
|
|
142
140
|
}
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
autoprefixer: true,
|
|
146
|
-
stage: 3,
|
|
147
|
-
});
|
|
141
|
+
const postcssImports = require('postcss-import');
|
|
142
|
+
const autoprefixer = require('autoprefixer');
|
|
148
143
|
const postcssOptionsCreator = (inlineSourcemaps, extracted) => {
|
|
149
144
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
150
145
|
const optionGenerator = (loader) => ({
|
|
@@ -180,7 +175,10 @@ function getStylesConfig(wco) {
|
|
|
180
175
|
extracted,
|
|
181
176
|
}),
|
|
182
177
|
...extraPostcssPlugins,
|
|
183
|
-
|
|
178
|
+
autoprefixer({
|
|
179
|
+
ignoreUnknownVersions: true,
|
|
180
|
+
overrideBrowserslist: buildOptions.supportedBrowsers,
|
|
181
|
+
}),
|
|
184
182
|
],
|
|
185
183
|
});
|
|
186
184
|
// postcss-loader fails when trying to determine configuration files for data URIs
|
|
@@ -331,7 +331,7 @@ function statsErrorsToString(json, statsConfig) {
|
|
|
331
331
|
// See: https://github.com/webpack/webpack/issues/15980
|
|
332
332
|
const message = statsConfig.errorStack
|
|
333
333
|
? error.message
|
|
334
|
-
: (_b = (_a = /[\s\S]+?(
|
|
334
|
+
: (_b = (_a = /[\s\S]+?(?=\n+\s+at\s)/.exec(error.message)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : error.message;
|
|
335
335
|
if (!/^error/i.test(message)) {
|
|
336
336
|
output += r('Error: ');
|
|
337
337
|
}
|