- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 476
Closed
Labels
📚 documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers
Description
- I have searched the Issues to see if this bug has already been reported
- I have tested the latest version
Summary
When a CRA project using Flowbite is used in a monorepo setup e.g. NPM workspaces, the flowbite-react and flowbite packages get hoisted to the top-level node_modules folder. While the build (via npm run build), works as expected, the resultant CSS artifacts don't contain all the CSS.
This is documented in the library but requires a deep understanding of the CRA configuration to figure this out.
I suggest that better warnings be emitted or a exception be thrown if the required directory is missing.
flowbite-react/packages/ui/src/tailwind.ts
Lines 4 to 32 in 83e5583
| /** | |
| * Path to `node_modules` where `flowbite-react` is installed | |
| * | |
| * =============================================== | |
| * | |
| * For monorepo setup where `flowbite-react` is installed in the root `node_modules` but used in `apps/web` directory | |
| * @example | |
| * ``` | |
| * // tailwind.config.(js|cjs|mjs) file | |
| * | |
| * // cjs | |
| * const flowbite = require("flowbite-react/tailwind"); | |
| * // esm | |
| * import flowbite from "flowbite-react/tailwind"; | |
| * | |
| * { | |
| * content: [ | |
| * // ... | |
| * flowbite.content({ base: "../../" }) | |
| * ], | |
| * plugins: [ | |
| * // ... | |
| * flowbite.plugin() | |
| * ] | |
| * } | |
| * ``` | |
| * | |
| * @default "./" | |
| */ | 
Context
I was trying to use React + Flowbite + Tailwind (using CRA) in a package which is a part of a NPM monorepo
Metadata
Metadata
Assignees
Labels
📚 documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers