Skip to content

Commit

Permalink
refactor(@angular-devkit/build-angular): remove nonexistent argument …
Browse files Browse the repository at this point in the history
…from rxjs path mapping call

The rxjs path mapping function does not have any parameters and has not since version 5.5.0 which is not supported.

(cherry picked from commit d918af3)
  • Loading branch information
clydin authored and dgp1130 committed Jan 21, 2020
1 parent b3625e9 commit 084dad6
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { NamedLazyChunksPlugin } from '../../plugins/named-chunks-plugin';
import { OptimizeCssWebpackPlugin } from '../../plugins/optimize-css-webpack-plugin';
import { ScriptsWebpackPlugin } from '../../plugins/scripts-webpack-plugin';
import { WebpackRollupLoader } from '../../plugins/webpack';
import { findAllNodeModules, findUp } from '../../utilities/find-up';
import { findAllNodeModules } from '../../utilities/find-up';
import { WebpackConfigOptions } from '../build-options';
import { getEsVersionForFileName, getOutputHashFormat, normalizeExtraEntryPoints } from './utils';

Expand All @@ -55,11 +55,6 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
vendor: vendorSourceMap,
} = buildOptions.sourceMap;

const nodeModules = findUp('node_modules', projectRoot);
if (!nodeModules) {
throw new Error('Cannot locate node_modules directory.');
}

const extraPlugins: Plugin[] = [];
const extraRules: Rule[] = [];
const entryPoints: { [key: string]: string[] } = {};
Expand Down Expand Up @@ -363,7 +358,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
? 'rxjs/_esm2015/path-mapping'
: 'rxjs/_esm5/path-mapping';
const rxPaths = require(require.resolve(rxjsPathMappingImport, { paths: [projectRoot] }));
alias = rxPaths(nodeModules);
alias = rxPaths();
} catch {}

const extraMinimizers = [];
Expand Down

0 comments on commit 084dad6

Please sign in to comment.