webpack-rxjs-externals

raw JSON →
2.0.0 verified Sat Apr 25 auth: no javascript

Generate webpack externals configuration for RxJS v6+ automatically, avoiding manual maintenance of external module lists. Version 2.0.0 requires webpack >=2 and only supports RxJS v6 import paths (e.g., 'rxjs', 'rxjs/operators'), not the older v5 deep paths. This package is specifically for bundling RxJS separately from your app bundle via CDN or external script. Notable alternatives: manually listing externals or using webpack-node-externals. Maintained sporadically; last release 2.0.0.

error Module not found: Can't resolve 'rxjs/operators'
cause Using v5 deep path pattern 'rxjs/operators' is correct for v6, but if RxJS v5 is installed or paths are wrong, webpack may fail.
fix
Ensure RxJS v6+ is installed and use correct paths: 'rxjs' and 'rxjs/operators'.
error TypeError: webpackRxjsExternals is not a function
cause Attempting named import instead of default import.
fix
Use import webpackRxjsExternals from 'webpack-rxjs-externals';.
breaking Version 2.0.0 only supports RxJS v6+ import paths. Older v5 deep paths (e.g., 'rxjs/operator/map') are NOT supported.
fix Use version 1.1.0 if you need v5 deep path support.
breaking Requires webpack >=2.0.0. Not compatible with webpack 1.x.
fix Upgrade webpack to 2.x or later.
deprecated Package development is sparse; no updates since 2020. Consider manually specifying externals for recent RxJS versions or using webpack-node-externals.
fix Manually update externals list or switch to alternative library.
npm install webpack-rxjs-externals
yarn add webpack-rxjs-externals
pnpm add webpack-rxjs-externals

Shows how to integrate webpack-rxjs-externals into webpack config to externalize RxJS v6 imports.

// webpack.config.js
import webpackRxjsExternals from 'webpack-rxjs-externals';

export default {
  externals: [
    webpackRxjsExternals(),
  ],
};

// Entry file
import { of } from 'rxjs';
import { map } from 'rxjs/operators';

of(1, 2, 3).pipe(map(d => d * 10));