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

fix(vite): Tailwind/postcss optimisation issue #8471

Merged
merged 8 commits into from
Jun 5, 2023

Conversation

dac09
Copy link
Collaborator

@dac09 dac09 commented Jun 1, 2023

Fixes issue discussed in https://www.notion.so/redwoodjs/Understand-Tailwind-optimisation-issue-db9c6c435e7b4ccaaa9edb0e641f43d9?pvs=4

What was the problem?

when running postcss/tailwind through Vite where the web directory is not at the root of the repo, Vite passes the root path as cwd, not the web folder. HOWEVER - this really is only visible when you try to run dev or build programatically. Before this change we were only running build programatically, and dev through a binary - which is why we saw the issue on build but not on dev.

Why: because the tailwind optimiser was not looking in web/src/** but in src/** (which does not exist) because the process.cwd is the root of the project

@dac09 dac09 added the release:fix This PR is a fix label Jun 1, 2023
@replay-io
Copy link

replay-io bot commented Jun 1, 2023

1 replays were recorded for b1d5fcb.

image 0 Failed
image 1 Passed

View test run on Replay ↗︎

@dac09
Copy link
Collaborator Author

dac09 commented Jun 3, 2023

I think the tests will e2e tests will never pass here, because I introduced a new brinary (rw-vite-build). We're going to have to merge first! (I've tested locally with yalc)

@dac09
Copy link
Collaborator Author

dac09 commented Jun 5, 2023

Going to merge this in, as e2e tests will never pass with a new binary. Will revert/fix if there are issues

@dac09 dac09 merged commit be371ff into redwoodjs:main Jun 5, 2023
17 checks passed
@dac09 dac09 deleted the fix/tailwind-path-processing-vite branch June 5, 2023 06:58
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Jun 5, 2023
@jtoar jtoar modified the milestones: next-release, v6.0.0 Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants