diff --git a/aio/content/guide/aot-compiler.md b/aio/content/guide/aot-compiler.md index a5ddc8315f..9a3205e777 100644 --- a/aio/content/guide/aot-compiler.md +++ b/aio/content/guide/aot-compiler.md @@ -363,6 +363,10 @@ Those _npm_ commands are long and difficult to remember. Add the following _npm_ convenience script to the `package.json` so you can compile and rollup in one command. + + "build:aot": "ngc -p tsconfig-aot.json && rollup -c rollup-config.js", + + Open a terminal window and try it. @@ -526,10 +530,10 @@ Compiling with AOT presupposes certain supporting files, most of them discussed -Extend the `scripts` section of the `package.json` with these npm scripts: +With the following npm script in the `scripts` section of the `package.json`, you can easily serve +the AOT-compiled application: - "build:aot": "ngc -p tsconfig-aot.json && rollup -c rollup-config.js", "serve:aot": "lite-server -c bs-config.aot.json", @@ -545,7 +549,7 @@ Copy the AOT distribution files into the `/aot` folder with the node script: -Now AOT-compile the app and launch it with the `lite-server`: +Now AOT-compile the app and launch: npm run build:aot && npm run serve:aot