Skip to content
Gatsby plugin to use Babel plugin direct import and make it tree shaking
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.babelrc
.gitignore
.npmignore
LICENSE
README.md
index.js
package.json
yarn.lock

README.md

gatsby-plugin-direct-import

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

Install

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: [
        "my-package-name",
        {
          "name": "my-package-name/sub-package",
          "indexFile": "my-package-name/sub-package/index.es.js"
        }
      ],
    },
  },
];
You can’t perform that action at this time.