Skip to content

Commit

Permalink
docs(lettables): simplify doc on building with rxjs/operators
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonaden committed Oct 18, 2017
1 parent 37afd0a commit b2ee797
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/lettable-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand All @@ -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()
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit b2ee797

Please sign in to comment.