Files
cunningham/packages/react/vite.config.ts
Nathan Vasse 88e478d9f6 (react) add Pagination component
In order to create a DataGrid we first need a fully working pagination
component. It comes with multiples working examples in the documentation.
2023-03-28 12:00:27 +02:00

41 lines
910 B
TypeScript

import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import dts from "vite-plugin-dts";
import tsconfigPaths from "vite-tsconfig-paths";
// https://vitejs.dev/config/
export default defineConfig({
build: {
emptyOutDir: true,
outDir: "dist",
sourcemap: true,
lib: {
entry: {
index: "./src/index.ts",
},
formats: ["es"],
},
rollupOptions: {
external: ["react", "react-dom"],
output: {
globals: {
react: "React",
"react-dom": "ReactDOM",
},
},
},
},
plugins: [tsconfigPaths(), dts(), react()],
test: {
environment: "jsdom",
reporters: "verbose",
globals: true,
watchExclude: ["**/cunningham-tokens.js"],
coverage: {
all: true,
include: ["src/**/*.{ts,tsx}"],
exclude: ["**/*.stories.tsx", "**/*.spec.tsx"],
},
},
});