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

withMT helper inserts incorrect paths to tailwind config #835

Open
gdlmx opened this issue Oct 27, 2024 · 0 comments
Open

withMT helper inserts incorrect paths to tailwind config #835

gdlmx opened this issue Oct 27, 2024 · 0 comments

Comments

@gdlmx
Copy link

gdlmx commented Oct 27, 2024

In a monorepo, if the tailwind.config.js is not placed in the project's root directory, tailwindcss will fail to generate the CSS styles used by material-tailwind components, such as overflow-hidden (without prefix).

The utility function withMT causes this bug.

const materialTailwindConfig = {
darkMode: "class",
content: [
"./node_modules/@material-tailwind/react/components/**/*.{js,ts,jsx,tsx}",
"./node_modules/@material-tailwind/react/theme/components/**/*.{js,ts,jsx,tsx}",
],

It makes a wrong assumption about the relative path of node_modules. Please use the local variable __dirname to find out the correct path.

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