Skip to content

Commit

Permalink
refactor(@angular-devkit/build-angular): remove unused rxjs path mapping
Browse files Browse the repository at this point in the history
This path mapping was used during the transition to rxjs 5 via the use of rxjs-compat package during the Angular 5.x timeframe.  Now that the minimum version is 6.x and this transition is complete, these mappings are no longer necessary.
  • Loading branch information
clydin committed May 4, 2020
1 parent d008cf2 commit c7edbb8
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,17 +349,6 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
const loaderNodeModules = findAllNodeModules(__dirname, projectRoot);
loaderNodeModules.unshift('node_modules');

// Load rxjs path aliases.
// https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md#build-and-treeshaking
let alias = {};
try {
const rxjsPathMappingImport = wco.supportES2015
? 'rxjs/_esm2015/path-mapping'
: 'rxjs/_esm5/path-mapping';
const rxPaths = require(require.resolve(rxjsPathMappingImport, { paths: [projectRoot] }));
alias = rxPaths();
} catch {}

const extraMinimizers = [];
if (stylesOptimization) {
extraMinimizers.push(
Expand Down Expand Up @@ -488,7 +477,6 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
extensions: ['.ts', '.tsx', '.mjs', '.js'],
symlinks: !buildOptions.preserveSymlinks,
modules: [wco.tsConfig.options.baseUrl || projectRoot, 'node_modules'],
alias,
plugins: [PnpWebpackPlugin],
},
resolveLoader: {
Expand Down

0 comments on commit c7edbb8

Please sign in to comment.