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

Flowbite setup with NX Monorepo #1355

Closed
MuttakinHasib opened this issue Apr 10, 2024 · 6 comments
Closed

Flowbite setup with NX Monorepo #1355

MuttakinHasib opened this issue Apr 10, 2024 · 6 comments

Comments

@MuttakinHasib
Copy link

Hey @SutuSebastian

I am trying to setup Flowbite with NextJs on Nx Monorepo, but it's not working. Can you please take a look?

Here is the codesandbox link: nx-nextjs-flowbite

@SutuSebastian
Copy link
Collaborator

SutuSebastian commented Apr 10, 2024

According to version 0.8.0 changelog and breaking changes, u have to do the following:

  1. correctly configure tailwind.config.js using the flowbite-react/tailwind proxy
Screenshot 2024-04-10 at 17 34 54
  1. flowbite package can be removed (optional)
Screenshot 2024-04-10 at 17 34 52

Refs:
0.8.0 Release changelog

@MuttakinHasib
Copy link
Author

@SutuSebastian Do I need to pass the base to the plugin also?

flowbite.plugin({ base: '../../' })

@SutuSebastian
Copy link
Collaborator

SutuSebastian commented Apr 10, 2024

@SutuSebastian Do I need to pass the base to the plugin also?

flowbite.plugin({ base: '../../' })

I gave u a functional example, since I cloned it myself for testing.

Reason of base option: node_modules folder is located two levels higher than where tailwind.config.js lives, hence the '../../'.

Note: base option is only for flowbite.content() function

@MuttakinHasib
Copy link
Author

MuttakinHasib commented Apr 10, 2024

Need TS support here. it's not giving any suggestions.

btw, Thanks @SutuSebastian ❤️

@SutuSebastian
Copy link
Collaborator

SutuSebastian commented Apr 10, 2024

Need TS support here. it's not giving any suggestions.

btw, Thanks @SutuSebastian ❤️

TS support/intellisense is only available within *.mjs or .ts(x) files, see below in a tailwind.config.mjs file:

Screenshot 2024-04-10 at 17 54 21 Screenshot 2024-04-10 at 17 54 35 Screenshot 2024-04-10 at 17 54 48

@MuttakinHasib
Copy link
Author

@SutuSebastian Thanks ❤️

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

2 participants