material-tailwind icon indicating copy to clipboard operation
material-tailwind copied to clipboard

withMT helper inserts incorrect paths to tailwind config

Open gdlmx opened this issue 1 year ago • 0 comments

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.

https://github.com/creativetimofficial/material-tailwind/blob/1558739b139d70d373eae00c992b0f6180aaa05a/packages/material-tailwind-react/src/utils/withMT.js#L11-L16

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

gdlmx avatar Oct 27 '24 18:10 gdlmx