Skip to content

Commit 7f1017e

Browse files
committed
refactor(@angular-devkit/build-angular): remove old bundleDependencies enum logic
BREAKING CHANGE: server builder `bundleDependencies` option now only accept a boolean value.
1 parent 4f8a3d2 commit 7f1017e

File tree

3 files changed

+2
-33
lines changed

3 files changed

+2
-33
lines changed

goldens/public-api/angular_devkit/build_angular/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export interface ProtractorBuilderOptions {
244244

245245
// @public (undocumented)
246246
export interface ServerBuilderOptions {
247-
bundleDependencies?: BundleDependenciesUnion;
247+
bundleDependencies?: boolean;
248248
deleteOutputPath?: boolean;
249249
// @deprecated
250250
deployUrl?: string;

packages/angular_devkit/build_angular/src/builders/server/index.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -66,29 +66,6 @@ export function execute(
6666
const baseOutputPath = path.resolve(root, options.outputPath);
6767
let outputPaths: undefined | Map<string, string>;
6868

69-
if (typeof options.bundleDependencies === 'string') {
70-
options.bundleDependencies = options.bundleDependencies === 'all';
71-
context.logger.warn(
72-
`Option 'bundleDependencies' string value is deprecated since version 9. Use a boolean value instead.`,
73-
);
74-
}
75-
76-
if (!options.bundleDependencies) {
77-
// eslint-disable-next-line import/no-extraneous-dependencies
78-
const { __processed_by_ivy_ngcc__, main = '' } = require('@angular/core/package.json');
79-
if (
80-
!__processed_by_ivy_ngcc__ ||
81-
!__processed_by_ivy_ngcc__.main ||
82-
(main as string).includes('__ivy_ngcc__')
83-
) {
84-
context.logger.warn(tags.stripIndent`
85-
Warning: Turning off 'bundleDependencies' with Ivy may result in undefined behaviour
86-
unless 'node_modules' are transformed using the standalone Angular compatibility compiler (NGCC).
87-
See: https://angular.io/guide/ivy#ivy-and-universal-app-shell
88-
`);
89-
}
90-
}
91-
9269
return from(initialize(options, context, transforms.webpackConfiguration)).pipe(
9370
concatMap(({ config, i18n, target }) => {
9471
return runWebpack(config, context, {

packages/angular_devkit/build_angular/src/builders/server/schema.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,7 @@
184184
"bundleDependencies": {
185185
"description": "Which external dependencies to bundle into the bundle. By default, all of node_modules will be bundled.",
186186
"default": true,
187-
"oneOf": [
188-
{
189-
"type": "boolean"
190-
},
191-
{
192-
"type": "string",
193-
"enum": ["none", "all"]
194-
}
195-
]
187+
"type": "boolean"
196188
},
197189
"externalDependencies": {
198190
"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.",

0 commit comments

Comments
 (0)