-
|
Hello! I want to add a few webpack plugins to the base docs plugin that I want to use for my docusaurus instance. I decided to go the route of using the base plugin and then extending some of the functions but that had proven to be cumbersome. I found issues #4138 and #3299 which listed ways to do what I had in mind. However I had been getting weird errors which were hard to comprehend. First one was The second one. I have spun up a repository for you to check what I am doing wrong in the configuration. Maybe I lack proper Javascript knowledge??? You can find the plugin I have setup at Does preset setup of docusaurus collide with plugin implementation? Does preset configuration provide some defaults which I am missing in my example?? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
The problem is likely because you forgot this line: export { validateOptions } from '@docusaurus/plugin-content-docs';This is important because if you don't "forward" that method to your own plugin, the options never get "normalized", which means the default values the docs plugin expects remain undefined, leading to unexpected behaviors. |
Beta Was this translation helpful? Give feedback.

The problem is likely because you forgot this line:
This is important because if you don't "forward" that method to your own plugin, the options never get "normalized", which means the default values the docs plugin expects remain undefined, leading to unexpected behaviors.