
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ember-cli-prerender
Advanced tools
An Ember CLI addon for prerendering Ember.js apps and generating sitemaps.
Applications that heavily use Javascript to render pages, like apps made with Ember.js or any other Javascript framework,
When a Javascript application is prerendered, the intial render on the client-side can happen before the Javascript files are loaded and run. Faster initial render improves the user experience and the search engine ranking.
You should definitely use this addon if:
<loc> tag is automatically added to the XML sitemap for each page. <lastmod>, <changefreq> and <priority> can be added as well (Example).These benefits can also be achieved with server-side rendering. FastBoot can be used to render Ember.js apps on the server-side, but it has these drawbacks:
This addon uses FastBoot when prerendering your app, but it uses it on buildtime instead of on runtime.
This addon is being used in production in the following websites:
Are you using this addon in production as well? Edit README.md and add your site to this list!
ember install ember-cli-prerenderember generate sitemap-utilsember generate sitemap xml (optional, for submitting to search engines)ember generate sitemap txt (required for the prerendering functionality to work)utils/dynamic-segment-resolver.js so that it returns possible values for each dynamic segment (Example).ember-cli-build.js: var app = new EmberApp(defaults, {
'ember-cli-prerender': {
sitemap: {
/**
* Your Ember app's internet address.
* All relative paths in your sitemap will be prefixed with this.
*/
rootUrl: 'https://mydummyapp.com/',
},
}
});
package.json:{
"scripts": {
"build": "ember build",
"postbuild": "ember prerender"
}
}
npm run build
This will build your app, prerender it and generate sitemap files along with prerendered HTML files in your /dist directory.
This is an optional step. If you would like to run the prerendered version locally, do the following:
npm install express-simple-static-server --save-devpackage.json:{
"scripts": {
"start-prerendered": "static-server dist"
}
}
npm run start-prerenderedIf you're using an older version of this addon and want to upgrade to the newest version, follow these steps:
npm install --save-dev ember-cli-prerenderember generate sitemap-utils (Choose NOT to overwrite your files, if you already have the utils.)ember generate sitemap xml (Only if you're using the XML sitemap)ember generate sitemap txtember server and make sure your sitemap.txt works.You most likely will not need to adjust any of the following settings.
| Setting | Type | Default | Description |
|---|---|---|---|
| input-dir | String | dist | Change it if your app does not get built in the default /dist directory. |
| output-dir | String | dist | By default, the prerendered files are saved in your /dist folder. This option allows you to change that. |
| empty-output-dir | Boolean | false | If true, the prerendering script will clear the output directory before creating the prerendered files. Should be used in conjunction with output-dir. |
| max-simultaneous-url-fetches | Number | 4 | We throttle requests to our local Fastboot server so it doesn't get overloaded with too many async requests. |
| root-url | String | You can leave it blank if your app is located at the root-level on your domain. If your app is in a subfolder, this setting should match the rootUrl setting in your ember-cli-build.js. | |
| sitemap-file-name | String | sitemap | The file name for the txt and xml sitemaps. |
| use-alternative-server | String | false | If you want to bypass using the prerender server and use one of your own |
Example:
ember prerender --output-dir dist-static --empty-output-dir 1 --max-simultaneous-url-fetches 12
As with every other open-source project, contributions are appreciated!
/lib/git clone this repositorynpm installnpm startnpm testnpm run test-watchnpm run buildnpm run static-serverMIT
FAQs
An Ember CLI addon for prerendering Ember.js apps.
We found that ember-cli-prerender demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.