Playwright Plugin
The Playwright renderer plugin uses the Playwright browser automation engine to render your Angular pages into static HTML. Playwright is a modern alternative to Puppeteer that offers cross-browser support (Chromium, Firefox, and WebKit) and improved performance.This plugin is currently in Preview/Beta status.
Installation
Install the plugin using npm:Configuration
Import the plugin in your Scully configuration file:Usage
Once the plugin is imported, it automatically replaces the default Puppeteer renderer. You can use Scully as you normally would:- Automatically install Playwright dependencies on first run
- Launch a Playwright browser instance
- Render each route using Playwright
- Generate static HTML files
Features
Automatic Browser Installation
The plugin automatically installs required Playwright browser binaries when you first run Scully:Cross-Browser Support
Playwright supports multiple browser engines. You can configure which browser to use:Manual Idle Detection
For routes that require manual control over when rendering is complete:Resource Type Filtering
Ignore specific resource types during rendering to improve performance:Screenshot Generation
Generate thumbnails of your pages:thumbnail.jpg in each route’s output directory.
Advanced Configuration
Custom Launch Options
You can customize Playwright’s launch options:Expose Data to Pages
Inject data that your Angular app can access during rendering:Comparison with Puppeteer
| Feature | Playwright | Puppeteer |
|---|---|---|
| Browser Support | Chromium, Firefox, WebKit | Chromium only |
| Performance | Faster | Standard |
| Modern APIs | Yes | Partial |
| Auto-install | Yes | No |
| Status | Beta | Stable |
Troubleshooting
Browser Installation Fails
If automatic browser installation fails, manually install Playwright browsers:Rendering Timeout
If pages timeout during rendering, increase the timeout or use manual idle check:Browser Doesn’t Close
Ensure your Angular app triggers theAngularReady event or call pageRenderReady().
Repository
- Package:
@scullyio/scully-plugin-playwright - Repository: GitHub
- Version: 2.1.42+

