From b2ee79727d700faf093dbcb976d92a84fb750047 Mon Sep 17 00:00:00 2001 From: Jason Aden Date: Wed, 18 Oct 2017 15:50:53 -0700 Subject: [PATCH] docs(lettables): simplify doc on building with rxjs/operators --- doc/lettable-operators.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/lettable-operators.md b/doc/lettable-operators.md index 3aa4e6a2b7b..224e2139baa 100644 --- a/doc/lettable-operators.md +++ b/doc/lettable-operators.md @@ -117,7 +117,7 @@ In order to use the new lettable operators and not gain bundle size, you will ne Published along with rxjs 5.5 is builds of rxjs in ECMAScript Module format (imports and exports) with both ES5 and ES2015 language level. You can find these distributions in `node_modules/rxjs/_esm5` and `node_modules/rxjs/_esm2015` ("esm" stands for ECMAScript Modules and the number "5" or "2015" is for the ES language level). In your application source code, you should import from `rxjs/operators`, but in your Webpack configuration file you will need to re-map imports to the ESM5 (or ESM2015) version. -If you `require('rxjs/_esm5/path-mapping')`, you will receive a function that takes a path to your node modules (or any directory containing the rxjs distribution) and returns an object of key-value pairs mapping each input to it's file location on disk. Utilize this mapping as follows: +If you `require('rxjs/_esm5/path-mapping')`, you will receive a function that returns an object of key-value pairs mapping each input to it's file location on disk. Utilize this mapping as follows: **webpack.config.js** @@ -134,7 +134,7 @@ module.exports = { output: 'bundle.js', resolve: { // Use the "alias" key to resolve to an ESM distribution - alias: rxPaths(path.resolve(__dirname, 'node_modules')) + alias: rxPaths() }, plugins: [ new webpack.optimize.ModuleConcatenationPlugin() @@ -179,7 +179,7 @@ var config = { resolve: { extensions: [".ts", ".js"], modules: [path.resolve('./src'), 'node_modules'], - alias: rxPaths(path.resolve(__dirname, 'node_modules')) + alias: rxPaths() }, plugins: [ new webpack.DefinePlugin({