themesberg / themesberg/flowbite-react
Improve monorepo support, provide configuration path for `.flowbite-react` directory
Open
@SutuSebastian is already working on this.
Since Apr 15, 2025.
:rocket: enhancement
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 506
- PR merge metrics
- No merged PRs in 30d
Description
- I have searched the Issues to see if this bug has already been reported
- I have tested the latest version
Steps to reproduce
- Create repository with Nx
- Use
@nx/vite - Run the application with
@nx/vite
Current behavior
The path of .flowbite-react by the plugin is being resolved into the root directory of the monorepo.
The class-list.json is being generated in the root directory.
Expected behavior
The path of .flowbite-react by the plugin is being resolved to the application directory or to the configured plugin path.
Context
When running scripts via NX the execution path is the root of the repository. This means when one does process.cwd() the root path is being returned.
I had similar issue with Tanstack Router, fortunately it has path configuration
defineViteConfig({
logLevel: 'info',
root: import.meta.dirname,
plugins: [
react(),
tailwindcss(),
flowbiteReact(),
svgr(),
TanStackRouterVite({
routesDirectory: `${import.meta.dirname}/src/routes`,
generatedRouteTree: `${import.meta.dirname}/src/routeTree.gen.ts`,
}),
],
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.