Puppeteer Plugin
The Puppeteer plugin is the default rendering engine for Scully. It uses Puppeteer to launch a headless Chrome browser, navigate to your Angular application routes, and capture the rendered HTML for static generation.Overview
Puppeteer is a Node library that provides a high-level API to control Chrome or Chromium browsers. Scully uses Puppeteer to:- Launch a headless browser instance
- Navigate to each route in your Angular application
- Wait for the application to fully render
- Extract the HTML content
- Save it as a static file
Installation
The Puppeteer plugin comes bundled with Scully, but you need to install Puppeteer as a peer dependency:Configuration
The Puppeteer renderer is the default renderer in Scully. If you’ve installed it separately, import it in your Scully configuration:Usage
Once configured, use Scully normally:Features
Automatic Route Discovery
Puppeteer automatically handles Angular routing and renders each discovered route:Manual Idle Check
For complex pages with dynamic content, you can manually control when Scully considers the page ready:Request Interception
Filter resources during rendering to improve performance:Bare Project Mode
For non-Angular projects or special cases:Screenshot/Thumbnail Generation
Generate screenshots of your pages:thumbnail.jpg in each route’s output directory.
Host URL Configuration
Specify a custom host URL for rendering:SSL Support
Render pages over HTTPS:Advanced Features
Expose Data to Pages
Pass data from Scully to your Angular application:Inject Data into Pages
Inject data into the static HTML:window['ScullyIO-injected'].
Show Browser for Debugging
Debug rendering issues by viewing the browser:Troubleshooting
Rendering Errors
If a page fails to render, Scully retries up to 3 times. Common issues:-
Timeout: Page takes too long to render
- Solution: Use
manualIdleCheckor increase timeout
- Solution: Use
-
404 Routes: Angular doesn’t provide the route
- Solution: Verify the route exists in your Angular app
-
Browser Crashes: Puppeteer instance dies
- Solution: Check system resources, update Puppeteer
Empty Content
If rendered pages are empty:- Ensure your Angular app emits the
AngularReadyevent - Check that
@scullyio/ng-libis installed and configured - Verify routes are correctly defined
Performance Issues
To improve rendering performance:- Use
ignoreResourceTypesto skip unnecessary resources - Disable images, fonts, and stylesheets if not needed for rendering
- Use
bareProjectmode for simpler applications
Interface
The render plugin interface:Repository
- Package:
@scullyio/scully-plugin-puppeteer - Repository: GitHub
- Puppeteer Version: ^13.4.1+
See Also
- Playwright Plugin - Modern alternative to Puppeteer
- Render Plugins Guide
- Puppeteer Documentation

