Skip to content

Commit 69a9aa3

Browse files
committed
fix(cli-plugin-vitest): migrate configuration to vitest v8
1 parent 3887206 commit 69a9aa3

2 files changed

Lines changed: 6 additions & 17 deletions

File tree

packages/cli-plugin-vitest/src/CliPluginVitestModule.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ export class CliPluginVitestModule implements AlterInitSubTasks, AlterPackageJso
2323
});
2424
packageJson.addDevDependencies({
2525
vitest: "latest",
26-
"unplugin-swc": "latest",
27-
"@vitest/coverage-v8": "latest",
28-
"@swc/core": "latest"
26+
"@vitest/coverage-v8": "latest"
2927
});
3028
}
3129

packages/cli-plugin-vitest/src/templates/vitest.config.template.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,17 @@ export default defineTemplate({
99
hidden: true,
1010

1111
render() {
12-
return `import swc from "unplugin-swc";
13-
import {defineConfig} from "vitest/config";
12+
return `import {defineConfig} from "vitest/config";
1413
1514
export default defineConfig({
15+
resolve: {
16+
tsconfigPaths: true
17+
},
1618
test: {
1719
globals: true,
1820
root: "./"
1921
},
20-
plugins: [
21-
// This is required to build the test files with SWC
22-
swc.vite({
23-
// Explicitly set the module type to avoid inheriting this value from a \`.swcrc\` config file
24-
module: {type: "es6"},
25-
jsc: {
26-
transform: {
27-
useDefineForClassFields: false
28-
}
29-
}
30-
})
31-
]
22+
plugins: []
3223
});`;
3324
}
3425
});

0 commit comments

Comments
 (0)