docusaurus: Updating to 3.2 breaks tailwind integration in production

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I’m using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Upgrading to 3.2 broke the tailwind styling, which I’ve integrated according to https://medium.com/@bargadyahmed/docusaurus-a-guide-to-seamless-integration-with-tailwind-css-dd202211caac

Here I’ve added the banner-preview with the custom tailwind integration flathub-infra/documentation@e0dc841 (#272)

It still works fine in dev, but breaks in prod or locally - if I do yarn build and then yarn serve. Unfortunatly the production errors are not helpful.

Basically https://docs.flathub.org/banner-preview/ should be styled. Like this: image

Reproducible demo

https://github.com/flathub-infra/documentation

Steps to reproduce

  1. Checkout repo
  2. Run yarn
  3. Run yarn build
  4. Run yarn serve
  5. Goto http://localhost:3000/banner-preview

Expected behavior

The page should be styled like in the above image

Actual behavior

The page isn’t styled, presumably because tailwind isn’t working, after upgrading to 3.2

Your environment

Self-service

  • I’d be willing to fix this bug myself.

About this issue

  • Original URL
  • State: closed
  • Created 3 months ago
  • Reactions: 1
  • Comments: 17 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for reporting, it’s probably a mistake I did when refactoring things to improve performance.

I’ll take a look soon and publish a fix ASAP.

When using v3.2.0, plugins.configurePostCss(options) api not work anymore, maybe is the reason.

Ah, I see yes, it might prevent you from using a canary due to the 0.0.0 versions. I will try to figure out a solution to improve this.

Oops my bad, I forgot after trying to reproduce with the base guide the problem is in production

Indeed I have the same error in the sandbox with version 3.2.0 and no issue in version 3.1.0 i’ll try to take a look

3.2.0 sanbox dev no issue, prod issue

3.1.0 sandbox dev and prod no issue

and this is for all projects where I updated dependencies yesterday https://github.com/AvaloniaUI/avalonia-docs/pull/436 https://github.com/openyurtio/openyurt.io/pull/405

and everyone has the same problem, locally everything is fine, production is not

I don’t have any problem with Docusaurus V2 in this sandbox following this guide

https://stackblitz.com/edit/github-fvf5eb?file=src%2Fpages%2Findex.js

Thanks for the example, but it’s not very clear why everything works in the https://openfeature.dev/ version. https://github.com/open-feature/openfeature.dev/blob/main/docusaurus.config.ts#L279

And after updating the dependencies there are no https://github.com/open-feature/openfeature.dev/pull/489

Although, as mentioned above, everything works locally, but in production, alas. https://deploy-preview-489--openfeature.netlify.app/