Skip to content

Vite warnings when building the project #1437

Description

@SjurSutterudSagen

We have started to get some errors from Vite when building PxWeb. It seems we need to update how we do certain things in our vite.config.ts files.

> pxweb2@1.0.0 build
> vite build

(!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
  - `__dirname` (vite.config.ts:27:9). Use `import.meta.dirname` instead
  - import "./vite-plugin-virtual-module" without a file extension (vite.config.ts:5:37). Add the file extension
  - JSON import "./src/app/util/config/config.schema.json" without import attributes (vite-plugin-virtual-module.ts:5:31). Add `with { type: 'json' }`
Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.
> @pxweb2/pxweb2-api-client@0.0.1 build
> vite build

(!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
  - `__dirname` (vite.config.ts:7:9). Use `import.meta.dirname` instead
Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.
> @pxweb2/pxweb2-ui@0.0.1 build

(removed style-dictionary build output)

(!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
  - `__dirname` (vite.config.ts:7:9). Use `import.meta.dirname` instead
Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions