Skip to content

Commit 15b6360

Browse files
committed
make cypress config js
1 parent 0e16591 commit 15b6360

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { defineConfig } from "cypress";
2-
import { UserConfig } from "vite";
2+
import react from "@vitejs/plugin-react";
3+
import tsconfigPaths from "vite-tsconfig-paths";
34
import { version as reactVersion } from "react";
5+
import { cssInline } from "vite-plugin-inline-css";
46

5-
const viteConfig: UserConfig = {
6-
plugins: [],
7+
const viteConfig = {
8+
plugins: [react(), tsconfigPaths(), /*, IstanbulPlugin()*/ cssInline()],
79
server: {
810
watch: {
911
ignored: ["**/coverage"],
@@ -16,6 +18,13 @@ const viteConfig: UserConfig = {
1618
"process.env.NODE_DEBUG": false,
1719
"process.env.LOCAL": true,
1820
},
21+
resolve: {
22+
alias: {
23+
"cypress/react18": reactVersion.startsWith("18")
24+
? "cypress/react18"
25+
: "cypress/react",
26+
},
27+
},
1928
};
2029

2130
export default defineConfig({
@@ -28,7 +37,7 @@ export default defineConfig({
2837
// installCoverageTask(on, config);
2938
//Setting up a log task to allow logging to the console during an axe test because console.log() does not work directly in a test
3039
on("task", {
31-
log(message: string) {
40+
log(message) {
3241
console.log(message);
3342

3443
return null;

0 commit comments

Comments
 (0)