Skip to content

Commit

Permalink
fix: separate vite and vitest configs (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
diivi authored Jun 21, 2023
1 parent 4459c1a commit 7a980c8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = {
jest: true,
es2021: true,
},
ignorePatterns: ["test", "dist", "build", "public", "/**/node_modules/*", ".eslintrc.js", "vite.config.ts", "vite-env.d.ts", "postcss.config.js", "tailwind.config.js"],
ignorePatterns: ["test", "dist", "build", "public", "/**/node_modules/*", ".eslintrc.js", "vite.config.ts", "vite-env.d.ts", "postcss.config.js", "tailwind.config.js", "vitest.config.ts"],
rules: {
"indent": "off",
"@typescript-eslint/indent": "error",
Expand Down
10 changes: 4 additions & 6 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { defineConfig } from "vitest/config";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { crx } from "@crxjs/vite-plugin";
import manifest from "./manifest.json" assert { type: "json" };
import * as manifest from "./manifest.json";

// https://vitejs.dev/config/
export default defineConfig({
test: {
environment: "jsdom",
},
});
plugins: [react(), crx({ manifest } as any)],
});
8 changes: 8 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from "vitest/config";

// https://vitejs.dev/config/
export default defineConfig({
test: {
environment: "jsdom",
},
});

0 comments on commit 7a980c8

Please sign in to comment.