Skip to content
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

3.6.0 docusarus won't compile with the new docusarus faster plugin #1014

Closed
Celtech opened this issue Nov 4, 2024 · 8 comments
Closed

3.6.0 docusarus won't compile with the new docusarus faster plugin #1014

Celtech opened this issue Nov 4, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@Celtech
Copy link

Celtech commented Nov 4, 2024

Describe the bug

If you follow the 3.6.0 guide detailed here: https://docusaurus.io/blog/releases/3.6#docusaurus-faster
and install / set up the faster plugin you will be met with the following error when trying to compile:

image

Expected behavior

Current behavior

Possible solution

Steps to reproduce

Screenshots

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
  • Operating System and version (desktop or mobile):
  • Link to your project:
@Celtech Celtech added the bug Something isn't working label Nov 4, 2024
@pmarschik
Copy link

I suspect the instantiation of NodePolyfillPlugin in packages/docusaurus-theme-openapi-docs/src/index.ts is the culprit here.

With the following faster configuration my project builds (i.e. disable rspackBundler):

  future: {
    experimental_faster: {
      swcJsLoader: true,
      swcJsMinimizer: true,
      swcHtmlMinimizer: true,
      lightningCssMinimizer: true,
      rspackBundler: false,
      mdxCrossCompilerCache: true,
    },
  },

But ideally we should be able to ose the new rspack bundler.

@alvinometric
Copy link

alvinometric commented Nov 5, 2024

That should be fixed with #1003

It'a merged but not released yet. Honestly it would be so much better if @slorber had admin rights to this plugin

@slorber
Copy link
Contributor

slorber commented Nov 5, 2024

Yes support is merged but you'll have to use the next release of this project to enable Rspack, or force resolution to v3 of this dependency: https://github.com/Richienb/node-polyfill-webpack-plugin/releases/tag/v3.0.0

Unfortunately, I don't really have time to maintain this extra repository and I'm not confident with the codebase enough to merge/release things there on behalf of the original authors 😅

@sserrata
Copy link
Member

sserrata commented Nov 5, 2024

We're always happy to have you @slorber 😅...

Just a reminder that we publish canary releases with each merge to main, in the event you need new features sooner. You can discover the latest canary release version in the site/README badges or by visiting our package(s) on npmjs.org.

In general, we try to squeeze in at least a few changes/fixes into each release, hence why we didn't publish immediately. We also can't control for breaking changes introduced with new Docusaurus releases, e.g. changes requiring refactors or upgrades to dependencies, etc., which can further delay support.

@dogun-anduril
Copy link

@KashifSaadat
Copy link

Hi @dogun-anduril, this has been fixed now in the main branch. I have tested with canary release 0.0.0-949 and can confirm it's working successfully with the docusaurus-faster settings (and rspackBundler: true). My build time has reduced from 11 minutes to ~3 minutes!

Thank you very much @slorber & @sserrata ! 🎉

@slorber
Copy link
Contributor

slorber commented Nov 11, 2024

Awesome 🥳 thanks

@slorber
Copy link
Contributor

slorber commented Dec 11, 2024

Released in v4.3: #1043

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants