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

import.meta.resolve doesn't work in the tailwind.config file #14423

Open
mkeyy0 opened this issue Sep 14, 2024 · 1 comment
Open

import.meta.resolve doesn't work in the tailwind.config file #14423

mkeyy0 opened this issue Sep 14, 2024 · 1 comment

Comments

@mkeyy0
Copy link

mkeyy0 commented Sep 14, 2024

What version of Tailwind CSS are you using?

v3.4.10

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

vite 5.3.4, vue 3.4.31

What version of Node.js are you using?

v20.12.0

What operating system are you using?

macOS

Reproduction URL

Describe your issue

Tailwind doesn't support ESM natively and uses some tools to achieve that. And for some properties of import.meta like url works nice, but in my case, I need to use import.meta.resolve to resolve the path to my monorepo UI library in node_modules.
I know that I can use require.resolve as a workaround, but I'm not sure that is a good way to mix esm and cjs globals. So for me, it would be nice to add support of import.meta.resolve to the tailwind.config file

@Angelovsky
Copy link

It's the same issue for me. Thanks for reporting, and waiting for the TailwindCSS team to respond.

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