inovex / elements

Lovingly crafted ui components based on web components. Works well with all Frameworks - including Angular, React and Vue.
https://elements.inovex.de
MIT License
69 stars 9 forks source link

fix(ui-patterns): tailwind styles not being integrated #1377

Closed janivo closed 2 months ago

janivo commented 2 months ago

Closes #1376

Proposed Changes

Context

The issue arose from the inability of postcss.config.js to locate any tailwind.config.js file for processing. This was due to its expectation for tailwind.config.js to be located directly adjacent to it. Although the tailwind configuration file was correctly positioned, the introduction of Vite executors caused a change in the execution context, resulting in it being executed from our root directory where tailwind.config.js was not present.

// before introduction of vite executors
$ packages/ui-patterns > vite build // context -> packages/ui-patterns

// after introduction of vite executors
$ / > nx vite:build ui-patterns // context -> /

To resolve this issue, we need to utilize appropriate file paths within postcss.config.js to correctly reference the location of tailwind.config.js.