Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub


Gatsby plugin to use Babel plugin direct import and make it tree shaking.


npm install --save gatsby-plugin-direct-import

How to use

Add the plugin to your gatsby-config.js.

plugins: [
    resolve: `gatsby-plugin-direct-import`,
    options: {
      packages: [
          "name": "my-package-name/sub-package",
          "indexFile": "my-package-name/sub-package/index.es.js"
© 2023 Gatsby, Inc.