Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

@smarterlabs/gatsby-plugin-browser-dependencies

Excludes browser-only dependencies from your SSR builds in Gatsby.

Installation

yarn add @smarterlabs/gatsby-plugin-browser-dependencies

or

npm install --save @smarterlabs/gatsby-plugin-browser-dependencies

Usage

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `@smarterlabs/gatsby-plugin-browser-dependencies`,
      options: {
        dependencies: [
          `auth-js`,
          `browser-only-module`,
        ]
      },
    },
  ],
}
© 2023 Gatsby, Inc.