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
[docusaurus-plugin-typedoc] Incorrect plugin definition #271
Comments
Hey, good catch We don't support async plugin inits but we definitively want to in the future (even our core plugins need this in a few places) Surprised that current code works though 🤷♂️ |
thanks @timocov .. I can't quite remember why it was implemented that way originally but i think it was to do with some odd race conditions .However everything seems to work using the 'correct' implementation as per your suggestion. |
@tgreyuk It seems that it should be fixed in the latest version according to the changelog so we can close the issue now? |
According to docusaurus types a plugin's module should be a function (with optional properties), but a function which returns a result synchronously. But in
docusaurus-plugin-typedoc
plugin's code this function is asynchronous, what could cause some interesting issues like when a plugin couldn't generate all files in time and docusaurus will ignore them.For now it seems that it works fine in trivial cases, but I believe it might break anytime and most likely you won't be noticed about that.
It seems that the simplest solution could be moving at least this code inside
loadContent
function of returned plugin so docusaurus will wait until all work is done and only after that will continue.The text was updated successfully, but these errors were encountered: