prerender-spa-app
v1.5.1
Published
Pre-render any web app like react, vue, preact, ect,. after production build
Downloads
46
Maintainers
Readme
SPA Pre-render
Pre-render any SPA app like react, vue, solid, preact, ect...
Features
- support query params.
- support block service request to save time by reducing unwanted network calls and resources like image.
Upcoming Features
- Set cookie value before page load.
- Auto crawling by feature flag.
- Auto generate sitemap by feature flag.
Installation
Use the package manager npm to install.
npm install prerender-spa-app
Usage
To create config json on root dir
npx spr -init
Run pre-render script follow
npx spr -run
OR
"scripts": {
"postbuild": "spr -run"
},
Configuration Detail
- spr_config show the default value.
- allowedHost is allows to connect to external services to allow all service remove allowedHost or use allowedHost: ["*"].
- blockedResourceType is to to block network service request based on resource type like image, script, ect...
- urls are list of url path to be pre-render like ["","about-us"] ill render index.html, about-us.html.
- port of local server to serve for pre-render.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Github