Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.0] Can't use local plugins #1144

Closed
rstacruz opened this issue Jun 11, 2017 · 2 comments
Closed

[1.0] Can't use local plugins #1144

rstacruz opened this issue Jun 11, 2017 · 2 comments
Labels
help wanted Issue with a clear description that the community can help with.

Comments

@rstacruz
Copy link
Contributor

rstacruz commented Jun 11, 2017

There doesn't seem to be a way to use plugins that are stored in the project's repository itself.

// gatsby-config.js
module.exports = {
  plugins: [
    'gatsby-source-filesystem',
    'gatsby-transformer-sharp',

    // Let's try to load our own custom plugin
    // Relative path?
    './lib/my-gatsby-custom-plugin', // nope

    // Relative path in an object?
    { resolve: './lib/my-gatsby-custom-plugin' }, // nope

    // Absolute paths?
    require.resolve('./lib/my-gatsby-custom-plugin'), // nope
    { resolve: require.resolve('./lib/my-gatsby-custom-plugin') }, // nope
    '/absolute/path/to/plugin.js', // nope

    // Paths that are directories?
    '/absolute/path/to/plugin/', // nope
    '/absolute/path/to/plugin', // nope
    { resolve: '/absolute/path/to/plugin' }, // nope
  ]
}

Can I suggest this as a feature? Of course it needs a package.json as well, but that doesn't seem to be such a bad idea.

@jbolda jbolda added API/Plugins help wanted Issue with a clear description that the community can help with. labels Jun 11, 2017
@0x80
Copy link
Contributor

0x80 commented Jun 11, 2017

This is being worked on already #1126

@KyleAMathews
Copy link
Contributor

Would love your thoughts @rstacruz on the design in #1126! Closing this issue in favor of that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with.
Projects
None yet
Development

No branches or pull requests

4 participants