Skip to content

Resolve Vite dev server warnings in Chartlets frontend packages #147

Description

@freds-dev

Description

Running the Chartlets demo UI locally with:

cd chartlets.js/packages/demo
npm run dev

currently starts the Vite dev server, but emits two warnings:

(!) Your Vite config uses features that are unsupported by configLoader: 'native'
- __dirname (vite.config.ts:15:20). Use import.meta.dirname instead

[vite:react-swc] We recommend switching to @vitejs/plugin-react for improved performance as no swc plugins are used.

The same Vite config patterns are also used in the library package.

Expected behavior

The demo and library Vite configs should be compatible with Vite's upcoming native config loader behavior and should not use the SWC React plugin when no SWC plugins are configured.

Actual behavior

The frontend packages still use:

  • __dirname in Vite config files
  • @vitejs/plugin-react-swc although no SWC plugins are configured

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions