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

Support yarn 4 pnp for tailwind content() function #1473

Open
2 tasks done
karladler opened this issue Aug 23, 2024 · 0 comments
Open
2 tasks done

Support yarn 4 pnp for tailwind content() function #1473

karladler opened this issue Aug 23, 2024 · 0 comments

Comments

@karladler
Copy link

karladler commented Aug 23, 2024

  • I have searched the Issues to see if this bug has already been reported
  • I have tested the latest version

Summary

Using yarn4 with plug n play is not working using the tailwind content() function since it returns always a node_modules folder.

Context

original function in tailwind.cjs

function content({ base = "./" } = {}) {
  const path = "node_modules/flowbite-react/dist/esm/**/*.mjs";
  return `${base}${path}`;
}

suggestion:
do something like this, it's untested, but works for me, if I do it in tailwind.config.js.

return require.resolve('flowbite-react').replace('index.cjs', '**/*.{mjs,cjs}', base); // maybe use more sophisticated regex to get the actual base path of the module here.
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

1 participant