diff --git a/packages/web/src/utils/third-party/cli-files/models/webpack-configs/browser.ts b/packages/web/src/utils/third-party/cli-files/models/webpack-configs/browser.ts index 949014277818f3..3a5d275c259d73 100644 --- a/packages/web/src/utils/third-party/cli-files/models/webpack-configs/browser.ts +++ b/packages/web/src/utils/third-party/cli-files/models/webpack-configs/browser.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ import { LicenseWebpackPlugin } from 'license-webpack-plugin'; -import { WebpackConfigOptions, BuildOptions } from '../build-options'; +import { WebpackConfigOptions } from '../build-options'; import { getSourceMapDevTool, isPolyfillsEntry, @@ -111,14 +111,6 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { enforce: true, priority: 5, }, - ...(isWebpack5 - ? { - styles: { - type: 'css/mini-extract', - chunks: 'all', - }, - } - : {}), vendors: false, // TODO(jack): Support both 4 and 5 vendor: !!buildOptions.vendorChunk && { diff --git a/packages/web/src/utils/third-party/cli-files/plugins/named-chunks-plugin.ts b/packages/web/src/utils/third-party/cli-files/plugins/named-chunks-plugin.ts index 1865492e273621..d20af00f76e923 100644 --- a/packages/web/src/utils/third-party/cli-files/plugins/named-chunks-plugin.ts +++ b/packages/web/src/utils/third-party/cli-files/plugins/named-chunks-plugin.ts @@ -6,16 +6,16 @@ * found in the LICENSE file at https://angular.io/license */ import { Compiler } from 'webpack'; -// Webpack doesn't export these so the deep imports can potentially break. -// There doesn't seem to exist any ergonomic way to alter chunk names for non-context lazy chunks -// (https://github.com/webpack/webpack/issues/9075) so this is the best alternative for now. -const ImportDependency = require('webpack/lib/dependencies/ImportDependency'); -const ImportDependenciesBlock = require('webpack/lib/dependencies/ImportDependenciesBlock'); -const Template = require('webpack/lib/Template'); export class NamedLazyChunksPlugin { constructor() {} apply(compiler: Compiler): void { + // Webpack doesn't export these so the deep imports can potentially break. + // There doesn't seem to exist any ergonomic way to alter chunk names for non-context lazy chunks + // (https://github.com/webpack/webpack/issues/9075) so this is the best alternative for now. + const ImportDependency = require('webpack/lib/dependencies/ImportDependency'); + const ImportDependenciesBlock = require('webpack/lib/dependencies/ImportDependenciesBlock'); + const Template = require('webpack/lib/Template'); compiler.hooks.compilation.tap( 'named-lazy-chunks-plugin', (compilation) => {