diff --git a/packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts b/packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts index 522977554dc1..6cce4649f956 100644 --- a/packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts +++ b/packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts @@ -32,7 +32,7 @@ import { NormalizedBrowserOptions, normalizeOptions } from './options'; import { shutdownSassWorkerPool } from './sass-plugin'; import { Schema as BrowserBuilderOptions } from './schema'; import { createStylesheetBundleOptions } from './stylesheets'; -import { ChangedFiles, createWatcher } from './watcher'; +import type { ChangedFiles } from './watcher'; interface RebuildState { codeRebuild?: BundlerContext; @@ -673,6 +673,7 @@ export async function* buildEsbuildBrowser( } // Setup a watcher + const { createWatcher } = await import('./watcher'); const watcher = createWatcher({ polling: typeof userOptions.poll === 'number', interval: userOptions.poll,