gatsby-plugin-directory-named-index

    1.0.1 • Public • Published

    gatsby-plugin-directory-named-index

    A gatsby plugin wrapping directory-named-webpack-plugin

    allowing you to have the following file structure:

    src/components/MyComp/MyComp.js

    and yet import your files like:

    import MyComp from '../src/components/MyComp'

    making editor tab management and clarity simple without cluttering your file tree with unnecessary stuff.

    Install

    npm install --save gatsby-plugin-directory-named-index

    or

    yarn add gatsby-plugin-directory-named-index

    Use

    // In your gatsby-config.js
    module.exports = {
      plugins: [
        {
          resolve: `gatsby-plugin-directory-named-index`,
          options: {
            // see https://github.com/shaketbaby/directory-named-webpack-plugin
            // for a full list of config options
            honorIndex: true
          },
        },
      ],
    }

    License

    MIT

    Install

    npm i gatsby-plugin-directory-named-index

    DownloadsWeekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.57 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar