- Include the plugin in
plugins
folder by following the official documentation. - Update webpack config in the
gatsby-node.js
file:const path = require('path') exports.onCreateWebpackConfig = ({actions}) => { actions.setWebpackConfig({ resolve: { alias: { '~plugins': path.resolve(__dirname, 'plugins') } } }) }
- Import the plugin into any component:
import {ComponentName} from '~plugins/gatsby-plugin-name'
Last active
September 1, 2020 19:24
-
-
Save bartosjiri/e5bc96ba9c0959c9a417eeb541bde8fd to your computer and use it in GitHub Desktop.
Import a local plugin into a Gatsby project
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment