0.2.3 • Published 1 year ago

@gojek/gatsby-plugin-asphalt-ssr v0.2.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

gatsby-plugin-asphalt-ssr

A Gatsby plugin for Asphalt React with built-in server-side rendering support.

Install

# yarn
yarn add @gojek/gatsby-plugin-asphalt-ssr

# npm
npm install @gojek/gatsby-plugin-asphalt-ssr

Problem

Flash of Unstyled Content or FOUC may occur for Asphalt React components when server rendering your application.

Solution

Install and add @gojek/gatsby-plugin-asphalt-ssr to your list of Gatsby plugins in your gatsby-config.js file. This makes sure that there is no FOUC for Asphalt React components in your Gatsby application.

This plugin uses @asphalt-react/ssr and makes some changes to Gatsby Browser APIs and Gatsby Server Side Rendering APIs internally to solve FOUC.

How to use

// In your gatsby-config.js

module.exports = {
  plugins: [`@gojek/gatsby-plugin-asphalt-ssr`],
}

Local Development

Clone this repository

Clone the repository.

cd gatsby-plugin-asphalt-ssr

Install dependencies

yarn

⛴️ Release

Uses standard-version for managing releases.

  1. Make sure you are on the updated default branch. Like master.
  2. Run

    yarn run release

    Version bump & release commit & tag will be created automatically. Proceed to publishing if you want to publish as well.

🚀 Publish

  1. Make sure you are logged in to the target npm registry
  2. Check authorization to registry

    npm whoami --registry=https://registry.npmjs.org
  3. Authorise if needed

    npm adduser --registry=https://registry.npmjs.org
  4. Switch to master branch & publish

    yarn publish --registry=https://registry.npmjs.org
0.2.3

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago