2023-02-22 21:15:37 +01:00
|
|
|
import { defineConfig } from "vitest/config";
|
2022-12-13 23:19:07 +01:00
|
|
|
import react from "@vitejs/plugin-react-swc";
|
2023-01-07 21:36:18 +01:00
|
|
|
import loadVersion from "vite-plugin-package-version";
|
2023-02-19 18:03:54 +01:00
|
|
|
import checker from "vite-plugin-checker";
|
2022-12-13 23:19:07 +01:00
|
|
|
import path from "path";
|
|
|
|
|
|
|
|
export default defineConfig({
|
2023-02-19 15:55:09 +01:00
|
|
|
plugins: [
|
|
|
|
react(),
|
|
|
|
loadVersion(),
|
|
|
|
checker({
|
|
|
|
typescript: true, // check typescript build errors in dev server
|
2023-02-19 18:03:54 +01:00
|
|
|
eslint: {
|
|
|
|
// check lint errors in dev server
|
|
|
|
lintCommand: "eslint --ext .tsx,.ts src",
|
|
|
|
dev: {
|
|
|
|
logLevel: ["error"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}),
|
2023-02-19 15:55:09 +01:00
|
|
|
],
|
2022-12-13 23:19:07 +01:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
2022-12-13 23:50:13 +01:00
|
|
|
"@": path.resolve(__dirname, "./src"),
|
2022-12-13 23:19:07 +01:00
|
|
|
},
|
|
|
|
},
|
2023-02-22 21:15:37 +01:00
|
|
|
|
|
|
|
test: {
|
|
|
|
environment: "jsdom",
|
|
|
|
},
|
2022-12-13 23:19:07 +01:00
|
|
|
});
|