Skip to content

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

@antonio-ivanovski

Description

@antonio-ivanovski
  • 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`,
          }),
      ],

Metadata

Metadata

Assignees

Labels

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions