themesberg / themesberg/flowbite-react

Improve monorepo support, provide configuration path for `.flowbite-react` directory

Open
#1,558 6 comments 0 reactions 1 assignee View on GitHub

@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

  1. Create repository with Nx
  2. Use @nx/vite
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.