Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

v2.0.0-rc.2

Compare
Choose a tag to compare
@trotzig trotzig released this 16 Jul 21:32
· 0 commits to master since this release

This major release will change the way this plugin works in an effort to produce more consistent screenshots, plus make them more like what a regular user would see. Instead of just using the SSR page templates, we will now send a static build to happo.io for remote rendering. This is similar to what the happo-plugin-storybook plugin does.

Installation

npm install happo-plugin-gatsby@next

Migration from v1

  • You no longer have to build a static gatsby build yourself - it is now part of the plugin itself. Remove the INSTALL_CMD to prevent building the static package twice.
  • The pagesFilter config has changed into a simple pages array. Specify the URLs you want to be part of the happo test here, e.g. pages: ['/', '/blog', '/blog/1234'].
  • The publicFolder option is now known as outputDir, and no longer require an absolute path.
  • You need to register the plugin in your application. Add import 'happo-plugin-gatsby/register' at the top of gatsby-browser.js (stored in the root of your project).