A plugin for happo.io that makes examples pre-render in a real browser (Chrome) instead of JSDOM
A Happo plugin that will replace the default JSDOM pre-rendering with a
Puppeteer (which uses Chrome). This plugin can come in handy if you for
instance need proper DOM measurements in your Happo examples.
Make sure to first install the plugin:
``sh`
npm install --save-dev happo-plugin-puppeteer
Then, add this to your plugins section of your .happo.js config file:
`js
const happoPluginPuppeteer = require('happo-plugin-puppeteer');
module.exports = {
plugins: [
happoPluginPuppeteer({
// ... options go here
}),
],
}
`
- launchOptions - options passed topuppeteer.launch
. E.g. { args: ['--no-sandbox'] }`.