From dc7feca51e55121b28c4ffc38c27fa114872f39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 13 Dec 2023 16:58:26 +0100 Subject: [PATCH] chore: use ESM Vite config Resolves a deprecation warning. --- tsconfig.esm.json | 2 +- tsconfig.json | 2 +- vite.config.ts => vite.config.mts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) rename vite.config.ts => vite.config.mts (93%) diff --git a/tsconfig.esm.json b/tsconfig.esm.json index c34134116..adbad3a1b 100644 --- a/tsconfig.esm.json +++ b/tsconfig.esm.json @@ -5,7 +5,7 @@ "src/demo", "src/index.tsx", "test-e2e", - "vite.config.ts", + "vite.config.mts", "playwright*" ], "compilerOptions": { diff --git a/tsconfig.json b/tsconfig.json index a0ddff7d9..467b20aca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,6 +18,6 @@ "noEmit": true, "jsx": "react-jsx" }, - "include": ["src", "test-e2e", "playwright.config.ts", "vite.config.ts"], + "include": ["src", "test-e2e", "playwright.config.ts", "vite.config.mts"], "exclude": ["node_modules"] } diff --git a/vite.config.ts b/vite.config.mts similarity index 93% rename from vite.config.ts rename to vite.config.mts index 221b57e09..fd2a6f344 100644 --- a/vite.config.ts +++ b/vite.config.mts @@ -1,6 +1,7 @@ import react from '@vitejs/plugin-react-swc'; import analyze from 'rollup-plugin-analyzer'; -import { AliasOptions, defineConfig } from 'vite'; +import type { AliasOptions } from 'vite' +import { defineConfig } from 'vitest/config'; // https://vitejs.dev/config/ export default () => {