Gridsome: Add support for local plugins

Created on 28 Oct 2018  路  3Comments  路  Source: gridsome/gridsome

I'm working on a source plugin and it took a little while to get it working. Ultimately I couldn't get require.resolve to resolve my plugin in a local plugins folder. In the end, I had to set my plugins use parameter to ../../../../src/plugins/source-umbraco to work.

Would be good if there was a nice way to be able to include local plugins as well as ones installed via NPM

Most helpful comment

It looks like you can use ~/plugins/whatever if you have plugins/whatever in your project's root path :)

All 3 comments

I'm surprised you got it working :) [email protected] was just published and should make this much easier. There is also some documentation about it here. Version 0.3 also makes it possible to use the plugin API directly from a gridsome.server.js file on root in your project. That allows you to fetch data from Umbraco without using plugins. Check out the new Data Store API.

You can also follow the How to contribute if you want to create a @gridsome/source-umbraco plugin. The repository uses Yarn workspaces to resolve local packages.

Page not found and no mention of local plugins usage in the documentation anymore :/

It looks like you can use ~/plugins/whatever if you have plugins/whatever in your project's root path :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

tanc picture tanc  路  3Comments

kaceo picture kaceo  路  3Comments

cyrilf picture cyrilf  路  3Comments

martifenosa picture martifenosa  路  3Comments