mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
fix(v2): Use require.resolve
to resolve plugin path in presets (#2794)
This commit is contained in:
parent
20fbceb9f1
commit
1503943e3f
3 changed files with 19 additions and 14 deletions
|
@ -40,8 +40,11 @@ Presets in some way are a shorthand function to add plugins and themes to your d
|
|||
```js
|
||||
module.exports = function preset(context, opts = {}) {
|
||||
return {
|
||||
themes: ['@docusaurus/themes-cool', '@docusaurus/themes-bootstrap'],
|
||||
plugins: ['@docusaurus/plugin-blog'],
|
||||
themes: [
|
||||
require.resolve('@docusaurus/themes-cool'),
|
||||
require.resolve('@docusaurus/themes-bootstrap'),
|
||||
],
|
||||
plugins: [require.resolve('@docusaurus/plugin-blog')],
|
||||
};
|
||||
};
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue