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

Tailwindcss will have no effect when srcDir is set to an external directory of the current working directory #4456

Closed
4 tasks done
ajiho opened this issue Jan 1, 2025 · 4 comments
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@ajiho
Copy link

ajiho commented Jan 1, 2025

Describe the bug

I raised an issue about the Tailwindcss style not being effective before.

With the enthusiastic help of Vitepress team member brc-dd, I solved this problem.

But now we have encountered a very tricky problem

kk.2025-01-01.14-51-08.mp4

Reproduction

https://github.com/ajiho/vitepress-tdcss-with-outside-srcdir-invalid

Expected behavior

Even if srcdir is set outside the current working directory, tailwindcss can still function properly

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz
    Memory: 1.90 GB / 7.91 GB
  Binaries:
    Node: 22.11.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.86)
    Internet Explorer: 11.0.19041.3636
  npmPackages:
    vitepress: ^1.5.0 => 1.5.0

Additional context

No response

Validations

@ajiho ajiho added the bug: pending triage Maybe a bug, waiting for confirmation label Jan 1, 2025
@ajiho
Copy link
Author

ajiho commented Jan 1, 2025

I have tried to modify the content attribute of TDconfig, but neither absolute nor relative path works

@ajiho
Copy link
Author

ajiho commented Jan 3, 2025

@brc-dd Can you help me take a look? Thank you.

@ajiho
Copy link
Author

ajiho commented Jan 3, 2025

The problem has been resolved, I have decided to close it

@ajiho ajiho closed this as completed Jan 3, 2025
@brc-dd
Copy link
Member

brc-dd commented Jan 3, 2025

What was the solution? Moving tailwind config to outside-src? (You can probably configure tw config path in postcss config too 👀)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants