2022-07-07 05:23:54 +00:00
|
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
import react from "@vitejs/plugin-react";
|
2022-08-02 12:11:38 +00:00
|
|
|
import checker from "vite-plugin-checker";
|
2022-07-07 05:23:54 +00:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2022-08-02 12:11:38 +00:00
|
|
|
base: "",
|
|
|
|
server: {
|
|
|
|
port: 8080,
|
|
|
|
},
|
2022-10-17 12:46:07 +00:00
|
|
|
build: {
|
|
|
|
target: "ES2022",
|
|
|
|
},
|
2022-07-07 05:23:54 +00:00
|
|
|
resolve: {
|
|
|
|
// Resolve the 'module' entrypoint at all times (not the default due to Node.js compatibility issues).
|
|
|
|
mainFields: ["module"],
|
2022-08-31 16:52:00 +00:00
|
|
|
dedupe: ["react", "react-dom"],
|
2022-07-07 05:23:54 +00:00
|
|
|
},
|
2022-08-03 12:12:07 +00:00
|
|
|
plugins: [react(), checker({ typescript: true })],
|
2022-07-07 05:23:54 +00:00
|
|
|
test: {
|
|
|
|
setupFiles: "vitest.setup.ts",
|
|
|
|
watch: false,
|
|
|
|
deps: {
|
|
|
|
// Ensure '.mjs' files are used for '@patternfly/react-styles'.
|
|
|
|
inline: [/@patternfly\/react-styles/],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|