Skip to content

Commit

Permalink
Update Vite config
Browse files Browse the repository at this point in the history
  • Loading branch information
evadecker committed Dec 10, 2024
1 parent 62916a8 commit 62657de
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"npm-run-all": "^4.1.5",
"playwright": "^1.49.0",
"prop-types": "^15.8.1",
"rollup-plugin-webpack-stats": "^1.1.1",
"tailwind-merge": "^2.5.5",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
/// <reference types="vitest" />

import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
import react from "@vitejs/plugin-react-swc";
import autoprefixer from "autoprefixer";
import cssnano from "cssnano";
import webpackStatsPlugin from "rollup-plugin-webpack-stats";
import tailwindcss from "tailwindcss";
import { defineConfig } from "vite";
import { defineConfig as defineViteConfig, mergeConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { configDefaults, coverageConfigDefaults } from "vitest/config";
import { defineConfig as defineVitestConfig } from "vitest/config";

// https://vitejs.dev/config/
export default defineConfig({
const viteConfig = defineViteConfig({
build: {
rollupOptions: {
output: {
Expand All @@ -37,6 +35,9 @@ export default defineConfig({
plugins: [autoprefixer(), tailwindcss(), cssnano()],
},
},
});

const vitestConfig = defineVitestConfig({
test: {
globals: true,
environmentMatchGlobs: [
Expand Down Expand Up @@ -69,3 +70,5 @@ export default defineConfig({
},
},
});

export default mergeConfig(viteConfig, vitestConfig);

0 comments on commit 62657de

Please sign in to comment.