diff --git a/public/docs/_examples/_boilerplate/systemjs.config.js b/public/docs/_examples/_boilerplate/systemjs.config.js index 0ea776d8f3..457f040fc0 100644 --- a/public/docs/_examples/_boilerplate/systemjs.config.js +++ b/public/docs/_examples/_boilerplate/systemjs.config.js @@ -26,7 +26,7 @@ // other libraries 'rxjs': 'npm:rxjs', - 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api', + 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js' }, // packages tells the System loader how to load when no filename and/or no extension packages: { @@ -36,10 +36,6 @@ }, rxjs: { defaultExtension: 'js' - }, - 'angular-in-memory-web-api': { - main: './index.js', - defaultExtension: 'js' } } }); diff --git a/public/docs/_examples/_boilerplate/systemjs.config.plunker.build.js b/public/docs/_examples/_boilerplate/systemjs.config.plunker.build.js index 41015e2e43..1741a7b0a6 100644 --- a/public/docs/_examples/_boilerplate/systemjs.config.plunker.build.js +++ b/public/docs/_examples/_boilerplate/systemjs.config.plunker.build.js @@ -51,7 +51,7 @@ // other libraries 'rxjs': 'npm:rxjs', - 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api', + 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js', 'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js', 'typescript': 'npm:typescript@2.0.2/lib/typescript.js', @@ -64,10 +64,6 @@ }, rxjs: { defaultExtension: 'js' - }, - 'angular-in-memory-web-api': { - main: './index.js', - defaultExtension: 'js' } } }); diff --git a/public/docs/_examples/_boilerplate/systemjs.config.plunker.js b/public/docs/_examples/_boilerplate/systemjs.config.plunker.js index c5314b3170..ecfd4afaa7 100644 --- a/public/docs/_examples/_boilerplate/systemjs.config.plunker.js +++ b/public/docs/_examples/_boilerplate/systemjs.config.plunker.js @@ -38,7 +38,7 @@ // other libraries 'rxjs': 'npm:rxjs', - 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api', + 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js', 'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js', 'typescript': 'npm:typescript@2.0.2/lib/typescript.js', @@ -51,10 +51,6 @@ }, rxjs: { defaultExtension: 'js' - }, - 'angular-in-memory-web-api': { - main: './index.js', - defaultExtension: 'js' } } }); diff --git a/public/docs/_examples/toh-6/ts/aot/index.html b/public/docs/_examples/toh-6/ts/aot/index.html index d42f3e0574..1a64ca8cac 100644 --- a/public/docs/_examples/toh-6/ts/aot/index.html +++ b/public/docs/_examples/toh-6/ts/aot/index.html @@ -6,6 +6,8 @@ Angular Tour of Heroes + + diff --git a/public/docs/_examples/toh-6/ts/app/app.module.ts b/public/docs/_examples/toh-6/ts/app/app.module.ts index 8ddf858972..c0933e4697 100644 --- a/public/docs/_examples/toh-6/ts/app/app.module.ts +++ b/public/docs/_examples/toh-6/ts/app/app.module.ts @@ -14,7 +14,7 @@ import { AppRoutingModule } from './app-routing.module'; // #enddocregion v1 // Imports for loading & configuring the in-memory web api -import { InMemoryWebApiModule } from 'angular-in-memory-web-api/in-memory-web-api.module'; +import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; import { InMemoryDataService } from './in-memory-data.service'; // #docregion v1 diff --git a/public/docs/_examples/toh-6/ts/copy-dist-files.js b/public/docs/_examples/toh-6/ts/copy-dist-files.js index 288e35a62c..660dadf55b 100644 --- a/public/docs/_examples/toh-6/ts/copy-dist-files.js +++ b/public/docs/_examples/toh-6/ts/copy-dist-files.js @@ -2,7 +2,8 @@ var fs = require('fs'); var resources = [ 'node_modules/core-js/client/shim.min.js', - 'node_modules/zone.js/dist/zone.min.js' + 'node_modules/zone.js/dist/zone.min.js', + 'styles.css' ]; resources.map(function(f) { var path = f.split('/'); diff --git a/public/docs/_examples/toh-6/ts/rollup-config.js b/public/docs/_examples/toh-6/ts/rollup-config.js index 4b42351c50..aeb227689c 100644 --- a/public/docs/_examples/toh-6/ts/rollup-config.js +++ b/public/docs/_examples/toh-6/ts/rollup-config.js @@ -12,13 +12,10 @@ export default { sourceMapFile: 'aot/dist/build.js.map', format: 'iife', plugins: [ - nodeResolve({jsnext: true, module: true}), - commonjs({ - include: [ - 'node_modules/rxjs/**', - 'node_modules/angular-in-memory-web-api/**' - ], - }), - uglify() + nodeResolve({jsnext: true, module: true}), + commonjs({ + include: ['node_modules/rxjs/**'] + }), + uglify() ] } diff --git a/public/docs/ts/latest/cookbook/aot-compiler.jade b/public/docs/ts/latest/cookbook/aot-compiler.jade index 9076f8635f..dbf6c1c7b9 100644 --- a/public/docs/ts/latest/cookbook/aot-compiler.jade +++ b/public/docs/ts/latest/cookbook/aot-compiler.jade @@ -401,13 +401,6 @@ a#toh Rollup does the Tree Shaking as before. - The Rollup configuration changes slightly to accommodate the `angular-in-memory-web-api` module - that the _Tour of Heroes_ app requires for data server simulation. - - The `angular-in-memory-web-api` is a `commonjs` module like the RxJS library. - Add `angular-in-memory-web-api` to the _commonjs plugin_ `include` array, - next to the `rxjs` file specification. - +makeExample('toh-6/ts/rollup-config.js',null,'rollup-config.js')(format='.') :marked diff --git a/public/resources/images/cookbooks/aot-compiler/toh6-bundle.png b/public/resources/images/cookbooks/aot-compiler/toh6-bundle.png index 8db47a35b2..d8592c4669 100644 Binary files a/public/resources/images/cookbooks/aot-compiler/toh6-bundle.png and b/public/resources/images/cookbooks/aot-compiler/toh6-bundle.png differ