This project has been discontinued in favor of two better alternatives:
- The official prerender-builder
- Scully as a Static-Site-Generator (https://github.com/scullyio/scully)
Work in Progress... More featues and docs are coming in the future.
npm install --save-dev @exportarts/angular-universal-utils
# or
yarn add -D @exportarts/angular-universal-utils
Use the prerenderApplication()
function to prerender an Angular Universal App.
All you have to provide is an array of routes to render and your compiled Universal App (similar to this example).
Optionally, a simple sitemap can be generated. This feature is really basic at the moment and more configuration options will eventually be available.
The easiest way is to run the function with ts-node
. Alternatively, you can build it with webpack and
run it with regular node
.
The project in ./lib
has several peer-dependencies. Those are installed
as dev-dependencies in the main project to have them available during
development, but to not have them included in the final package.json
.