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

It's not working when exporting(deployed on Bit.dev) #14

Open
aandriamanga opened this issue Mar 2, 2022 · 3 comments
Open

It's not working when exporting(deployed on Bit.dev) #14

aandriamanga opened this issue Mar 2, 2022 · 3 comments

Comments

@aandriamanga
Copy link

Hi, tailwind classes is work correctly on local but when I export my component on Bit classes is not recognize (any tailwind css).
This issue is present after changing "defaultScope" to my scope. Thanks

@LeugimAtreides
Copy link

Hi, tailwind classes is work correctly on local but when I export my component on Bit classes is not recognize (any tailwind css). This issue is present after changing "defaultScope" to my scope. Thanks

Yeah super disappointing after all the work to get it exported and how nice it was looking in the local env.

@donovanroubos
Copy link

Currently running into the same issue with the team. Any updates?

@aliansyahFirdaus
Copy link

aliansyahFirdaus commented Aug 9, 2023

ah! @aandriamanga

I realized that the issue stemmed from not including node_modules/@your-bit-org in the content section of the Tailwind CSS configuration. Adding this directory is crucial for correctly applying styling classes from Bit.dev components in the React project.

after install your package into react projec, check your location of components in node_modules and add this to your tailwind config

/** tailwind.config.js (in your react project) **/

export default {
  content: [
    './**/*.{jsx,tsx}',
    './node_modules/@your/components.**/*.{jsx,tsx}', //add this
  ],
  theme: {
    extend: {},
  },
  variants: {},
  plugins: [],
};

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

4 participants