You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a Bit React project using the following command: bit new react my-proj -a teambit.react/react-env -d my.scope
Afterward, I customized my own environment and integrated Tailwind CSS into it, allowing the components to seamlessly work with Tailwind styling.
I successfully developed the components, and they worked flawlessly even after exporting them to Bit Cloud. The preview displayed correct styling with proper Tailwind integration.
However, when I integrated the components into my ReactJS project by installing the package using yarn, I encountered an issue. The Tailwind CSS styling did not integrate properly, resulting in missing styles. As a result, the components appeared unstyled (please refer to the attached screenshot).
I am wondering if there's an error in the process of installing and integrating the components into my React project. Your assistance in resolving this matter would be greatly appreciated.
Steps to Reproduce
Create a new Bit React project using the command: bit new react my-proj -a teambit.react/react-env -d my.scope
Create the env to include Tailwind CSS integration for the components.
Develop and design components with bit create react-component atoms/title, ensuring proper Tailwind styling.
Export the components to Bit Cloud and verify that the preview displays the correct styling bit tag && bit export
Create a new ReactJS project.
Install the exported components from Bit Cloud into the ReactJS project using yarn yarn add @my.scope/my-comp1
Start react-app yarn dev
Attempt to use the components within the ReactJS project and observe the missing or incorrect Tailwind CSS styling.
Expected Behavior
My expectation is that the Tailwind class styling is implemented effectively.
Screenshots, exceptions, and logs
Specifications
Bit version: 0.1.74 (downgrade because 0.2.14 can't rename comp)
Workspace Type: harmony
Node version: 18.16.0
npm / yarn version: v1.22.19
The text was updated successfully, but these errors were encountered:
Hi there
This isn't a bug, certainly not with bit :)
Tldr you just need to configure the tailwind config in your react app, in the same way as you configured it in your bit env.
Longer explanation:
The configuration you applied in bit is just for bit's bundler to be able to render your compositions (examples) on your component page.
The component itself only contains tailwind styles, not the app-level config the consuming application uses, and that will always need to be supplied by the application that is consuming your components.
Describe the bug
I created a Bit React project using the following command:
bit new react my-proj -a teambit.react/react-env -d my.scope
Afterward, I customized my own environment and integrated Tailwind CSS into it, allowing the components to seamlessly work with Tailwind styling.
I successfully developed the components, and they worked flawlessly even after exporting them to Bit Cloud. The preview displayed correct styling with proper Tailwind integration.
However, when I integrated the components into my ReactJS project by installing the package using yarn, I encountered an issue. The Tailwind CSS styling did not integrate properly, resulting in missing styles. As a result, the components appeared unstyled (please refer to the attached screenshot).
I am wondering if there's an error in the process of installing and integrating the components into my React project. Your assistance in resolving this matter would be greatly appreciated.
Steps to Reproduce
bit new react my-proj -a teambit.react/react-env -d my.scope
bit create react-component atoms/title
, ensuring proper Tailwind styling.bit tag && bit export
yarn add @my.scope/my-comp1
yarn dev
Expected Behavior
My expectation is that the Tailwind class styling is implemented effectively.
Screenshots, exceptions, and logs
Specifications
The text was updated successfully, but these errors were encountered: