Skip to content

Commit

Permalink
use defineConfig as it reduces the issues with types
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-codecov committed Dec 23, 2024
1 parent cd7765e commit 6c71655
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 27 deletions.
4 changes: 2 additions & 2 deletions packages/astro-plugin/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import replace from "@rollup/plugin-replace";
import { defineProject } from "vitest/config";
import { defineConfig } from "vitest/config";
import { config } from "../../vitest.shared";

const packageJson = await import("./package.json");

export default defineProject({
export default defineConfig({
...config,
plugins: [
//@ts-expect-error handle conflicting version types
Expand Down
10 changes: 3 additions & 7 deletions packages/bundle-analyzer/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import replace from "@rollup/plugin-replace";
import { defineProject } from "vitest/config";
import { defineConfig } from "vitest/config";
import { config } from "../../vitest.shared";
import "ts-node/register";

Expand All @@ -10,16 +10,12 @@ const packageJson = await import("./package.json", {
assert: { type: "json" },
});

const setupTsNode = {
export default defineConfig({
...config,
files: ["./setup.ts"],
transformMode: {
web: [/\.tsx?$/],
},
};

export default defineProject({
...config,
...setupTsNode,
plugins: [
// @ts-expect-error - using rollup plugin
{
Expand Down
4 changes: 2 additions & 2 deletions packages/bundler-plugin-core/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineProject } from "vitest/config";
import { defineConfig } from "vitest/config";
import { config } from "../../vitest.shared";

export default defineProject({
export default defineConfig({
...config,
});
4 changes: 2 additions & 2 deletions packages/nextjs-webpack-plugin/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import replace from "@rollup/plugin-replace";
import { defineProject } from "vitest/config";
import { defineConfig } from "vitest/config";
import { config } from "../../vitest.shared";

const packageJson = await import("./package.json");

export default defineProject({
export default defineConfig({
...config,
plugins: [
//@ts-expect-error handle conflicting version types
Expand Down
4 changes: 2 additions & 2 deletions packages/nuxt-plugin/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import replace from "@rollup/plugin-replace";
import { defineProject } from "vitest/config";
import { defineConfig } from "vitest/config";
import { config } from "../../vitest.shared";

const packageJson = await import("./package.json");

export default defineProject({
export default defineConfig({
...config,
plugins: [
//@ts-expect-error handle conflicting version types
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-vite-plugin/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import replace from "@rollup/plugin-replace";
import { defineProject } from "vitest/config";
import { defineConfig } from "vitest/config";
import { config } from "../../vitest.shared";

const packageJson = await import("./package.json");

export default defineProject({
export default defineConfig({
...config,
plugins: [
//@ts-expect-error handle conflicting version types
Expand Down
4 changes: 2 additions & 2 deletions packages/rollup-plugin/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import replace from "@rollup/plugin-replace";
import { defineProject } from "vitest/config";
import { defineConfig } from "vitest/config";
import { config } from "../../vitest.shared";

const packageJson = await import("./package.json");

export default defineProject({
export default defineConfig({
...config,
plugins: [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/solidstart-plugin/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import replace from "@rollup/plugin-replace";
import { defineProject } from "vitest/config";
import { defineConfig } from "vitest/config";
import { config } from "../../vitest.shared";

const packageJson = await import("./package.json");

export default defineProject({
export default defineConfig({
...config,
plugins: [
//@ts-expect-error handle conflicting version types
Expand Down
4 changes: 2 additions & 2 deletions packages/sveltekit-plugin/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import replace from "@rollup/plugin-replace";
import { defineProject } from "vitest/config";
import { defineConfig } from "vitest/config";
import { config } from "../../vitest.shared";

const packageJson = await import("./package.json");

export default defineProject({
export default defineConfig({
...config,
plugins: [
//@ts-expect-error handle conflicting version types
Expand Down
4 changes: 2 additions & 2 deletions packages/vite-plugin/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import replace from "@rollup/plugin-replace";
import { defineProject } from "vitest/config";
import { defineConfig } from "vitest/config";
import { config } from "../../vitest.shared";

const packageJson = await import("./package.json");

export default defineProject({
export default defineConfig({
...config,
plugins: [
//@ts-expect-error handle conflicting version types
Expand Down
4 changes: 2 additions & 2 deletions packages/webpack-plugin/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import replace from "@rollup/plugin-replace";
import { defineProject } from "vitest/config";
import { defineConfig } from "vitest/config";
import { config } from "../../vitest.shared";

const packageJson = await import("./package.json");

export default defineProject({
export default defineConfig({
...config,
plugins: [
//@ts-expect-error handle conflicting version types
Expand Down

0 comments on commit 6c71655

Please sign in to comment.