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

@source directive not working with pnpm #16038

Open
adityaa72 opened this issue Jan 30, 2025 · 1 comment
Open

@source directive not working with pnpm #16038

adityaa72 opened this issue Jan 30, 2025 · 1 comment

Comments

@adityaa72
Copy link

adityaa72 commented Jan 30, 2025

What version of Tailwind CSS are you using?

v4.0.1

What build tool (or framework if it abstracts the build tool) are you using?

Next.js v15.1.6

What version of Node.js are you using?

v20.0.0

What browser are you using?

Firefox

What operating system are you using?

macOS

Reproduction URL

Tailwind 4 with pnpm
Tailwind 4 with yarn

Describe your issue

@source directive not working for node_modules packages with pnpm and nextjs. The same code is working with nextjs and yarn, and nextjs and npm, also same package works with pnpm with vite with @tailwindcss/vite

@import "tailwindcss";
@import "@jamsr-ui/theme/styles.css";

/* This is not working */
@source "../node_modules/@jamsr-ui";

/* These are working */
/* @source "../node_modules/@jamsr-ui/text"; */
/* @source "../node_modules/@jamsr-ui/button"; */
/* @source "../node_modules/@jamsr-ui/utils"; */
/* @source "../node_modules"; */

Here @source "../node_modules/@jamsr-ui"; is not working but nested @source are working as like @source "../node_modules/@jamsr-ui/text";.
Even @source "../node_modules" is working

@coadinglife
Copy link

Yaa, how to fix??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants