Request: Support project-relative links for Remark plugins and others
- Dominant language
- JavaScript
- Stars
- 8.5k
- Forks
- 466
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Currently it is possible to use project-relative plug-ins like `~/plugins/local-plug-in` when defining a plug-in path in the `use` property of the `gridsome.config.js` => `plugins` array.
However, it is not possible to use this type of link elsewhere (I'm specifically working with the first-party Remark plugin).
### Basic example
This doesn't work:
```js
plugins: {
{
use: '@gridsome/source-filesystem',
options: {
path: 'somepath/**/*.md',
typeName: 'SomePost',
remark: {
plugins: [
// This causes the Remark plug-in to fail with an exception
'~/plugins/local-plugin'
]
}
}
}
}
```
### Motivation
It would be very nice for plug-in references to be resolved the same across the Gridsome application (at least within first-party code). It would be even nicer if the core Gridsome project offered a standard method that would take a plug-in reference, and return the resolved path so that third-party plug-ins could easily implement this without needing to write the logic themselves.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.