Skip to content

Commit

Permalink
cleanup(webpack): remove unreachable code for lazy-loaded styles that…
Browse files Browse the repository at this point in the history
… we never supported (#14277)
  • Loading branch information
jaysoo committed Jan 11, 2023
1 parent 9f75f7c commit 6ce3466
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
33 changes: 0 additions & 33 deletions packages/webpack/src/utils/webpack/plugins/remove-hash-plugin.ts

This file was deleted.

8 changes: 0 additions & 8 deletions packages/webpack/src/utils/with-web.ts
Expand Up @@ -13,14 +13,12 @@ import { normalizeExtraEntryPoints } from '@nrwl/webpack/src/utils/webpack/norma

import { NormalizedWebpackExecutorOptions } from '../executors/webpack/schema';
import { getClientEnvironment } from './get-client-environment';
import { RemoveHashPlugin } from './webpack/plugins/remove-hash-plugin';
import { ScriptsWebpackPlugin } from './webpack/plugins/scripts-webpack-plugin';
import { getCSSModuleLocalIdent } from './get-css-module-local-ident';
import CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
import MiniCssExtractPlugin = require('mini-css-extract-plugin');
import autoprefixer = require('autoprefixer');
import postcssImports = require('postcss-import');
import { Postcss } from 'postcss';
import { basename } from 'path';

interface PostcssOptions {
Expand Down Expand Up @@ -89,7 +87,6 @@ export function withWeb() {

// Process global styles.
if (options.styles.length > 0) {
const chunkNames: string[] = [];
normalizeExtraEntryPoints(options.styles, 'styles').forEach((style) => {
const resolvedPath = path.resolve(options.root, style.input);
// Add style entry points.
Expand All @@ -102,11 +99,6 @@ export function withWeb() {
// Add global css paths.
globalStylePaths.push(resolvedPath);
});

if (chunkNames.length > 0) {
// Add plugin to remove hashes from lazy styles.
plugins.push(new RemoveHashPlugin({ chunkNames, hashFormat }));
}
}

const cssModuleRules: RuleSetRule[] = [
Expand Down

0 comments on commit 6ce3466

Please sign in to comment.