Skip to content

Commit c2a8bf1

Browse files
committed
refactor(@angular-devkit/build-angular): move Vite dev-server @angular/build imports into separate file
To reduce the complexity of the move of the Vite-based dev-server builder into the `@angular/build` package. The soon to be self-referencing imports are now located in a separate file. Self-referencing imports are not well supported inside the repository currently so this move allows the imports to be adjusted in one location.
1 parent 2391c87 commit c2a8bf1

File tree

3 files changed

+36
-13
lines changed

3 files changed

+36
-13
lines changed

packages/angular_devkit/build_angular/src/builders/dev-server/builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { type IndexHtmlTransform, purgeStaleBuildCache } from '@angular/build/private';
109
import type { BuilderContext } from '@angular-devkit/architect';
1110
import type { Plugin } from 'esbuild';
1211
import type http from 'node:http';
1312
import { EMPTY, Observable, defer, switchMap } from 'rxjs';
1413
import type { ExecutionTransformer } from '../../transforms';
1514
import { checkPort } from '../../utils/check-port';
15+
import { type IndexHtmlTransform, purgeStaleBuildCache } from './internal';
1616
import { normalizeOptions } from './options';
1717
import type { DevServerBuilderOutput } from './output';
1818
import type { Schema as DevServerBuilderOptions } from './schema';
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
export { BuildOutputFile, BuildOutputFileType } from '@angular/build';
10+
export {
11+
type ApplicationBuilderInternalOptions,
12+
type ExternalResultMetadata,
13+
JavaScriptTransformer,
14+
buildApplicationInternal,
15+
createRxjsEsmResolutionPlugin,
16+
getFeatureSupport,
17+
getSupportedBrowsers,
18+
isZonelessApp,
19+
transformSupportedBrowsersToTargets,
20+
type IndexHtmlTransform,
21+
purgeStaleBuildCache,
22+
} from '@angular/build/private';

packages/angular_devkit/build_angular/src/builders/dev-server/vite-server.ts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { BuildOutputFile, BuildOutputFileType } from '@angular/build';
10-
import {
11-
type ApplicationBuilderInternalOptions,
12-
type ExternalResultMetadata,
13-
JavaScriptTransformer,
14-
buildApplicationInternal,
15-
createRxjsEsmResolutionPlugin,
16-
getFeatureSupport,
17-
getSupportedBrowsers,
18-
isZonelessApp,
19-
transformSupportedBrowsersToTargets,
20-
} from '@angular/build/private';
219
import type { BuilderContext } from '@angular-devkit/architect';
2210
import type { json } from '@angular-devkit/core';
2311
import type { Plugin } from 'esbuild';
@@ -31,6 +19,19 @@ import { loadProxyConfiguration, normalizeSourceMaps } from '../../utils';
3119
import { loadEsmModule } from '../../utils/load-esm';
3220
import { buildEsbuildBrowser } from '../browser-esbuild';
3321
import { Schema as BrowserBuilderOptions } from '../browser-esbuild/schema';
22+
import {
23+
type ApplicationBuilderInternalOptions,
24+
type BuildOutputFile,
25+
BuildOutputFileType,
26+
type ExternalResultMetadata,
27+
JavaScriptTransformer,
28+
buildApplicationInternal,
29+
createRxjsEsmResolutionPlugin,
30+
getFeatureSupport,
31+
getSupportedBrowsers,
32+
isZonelessApp,
33+
transformSupportedBrowsersToTargets,
34+
} from './internal';
3435
import type { NormalizedDevServerOptions } from './options';
3536
import type { DevServerBuilderOutput } from './output';
3637

0 commit comments

Comments
 (0)