Skip to content

Commit bf68e7e

Browse files
chore(deps): update dependency vite to version 7.x 🌟 (#1657)
* chore(deps): update vite to 7.1.3 🌟 * update rest of dependencies to vite 7 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Bill Glesias <[email protected]>
1 parent ed37e80 commit bf68e7e

File tree

6 files changed

+296
-226
lines changed

6 files changed

+296
-226
lines changed

cypress.config.ts

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotenv from "dotenv";
55
import Promise from "bluebird";
66
import codeCoverageTask from "@cypress/code-coverage/task";
77
import { defineConfig } from "cypress";
8-
import { mergeConfig, loadEnv } from "vite";
8+
import viteConfig from "./vite.cypress.config.ts";
99

1010
dotenv.config({ path: ".env.local" });
1111
dotenv.config();
@@ -18,7 +18,7 @@ try {
1818
awsConfig = require(path.join(__dirname, "./aws-exports-es5.js"));
1919
} catch (e) {}
2020

21-
module.exports = defineConfig({
21+
export default defineConfig({
2222
projectId: "7s5okt",
2323
retries: {
2424
runMode: 2,
@@ -62,24 +62,7 @@ module.exports = defineConfig({
6262
devServer: {
6363
framework: "react",
6464
bundler: "vite",
65-
viteConfig: () => {
66-
const viteConfig = require("./vite.config.ts");
67-
const conf = {
68-
define: {
69-
"process.env": loadEnv("development", process.cwd(), "VITE"),
70-
},
71-
server: {
72-
/**
73-
* start the CT dev server on a different port than the full RWA
74-
* so users can switch between CT and E2E testing without having to
75-
* stop/start the RWA dev server.
76-
*/
77-
port: 3002,
78-
},
79-
};
80-
const resolvedViteConfig = mergeConfig(viteConfig, conf);
81-
return resolvedViteConfig;
82-
},
65+
viteConfig,
8366
},
8467
specPattern: "src/**/*.cy.{js,jsx,ts,tsx}",
8568
supportFile: "cypress/support/component.ts",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"@types/webpack-env": "1.16.4",
9393
"@types/yup": "0.29.13",
9494
"@typescript-eslint/parser": "^8.35.1",
95-
"@vitejs/plugin-react": "^4.0.2",
95+
"@vitejs/plugin-react": "^5.0.1",
9696
"babel-loader": "^10.0.0",
9797
"bcryptjs": "2.4.3",
9898
"concurrently": "9.1.2",
@@ -133,7 +133,7 @@
133133
"ts-node": "10.9.2",
134134
"typescript": "5.8.3",
135135
"typescript-eslint": "^8.35.1",
136-
"vite": "^4.4.2",
136+
"vite": "^7.1.3",
137137
"vite-plugin-eslint": "^1.8.1",
138138
"vite-plugin-istanbul": "^4.1.0",
139139
"vitest": "^3.2.4",

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"baseUrl": "src",
4-
"target": "es5",
4+
"target": "ES2020",
55
"lib": ["dom", "dom.iterable", "esnext"],
66
"allowJs": true,
77
"skipLibCheck": true,

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import react from "@vitejs/plugin-react";
33
import eslint from "vite-plugin-eslint";
44
import istanbul from "vite-plugin-istanbul";
55

6-
export default defineConfig(({ command, mode }) => {
6+
export default defineConfig(({ mode }) => {
77
const env = loadEnv(mode, process.cwd(), "VITE");
88
return {
99
// expose all vite "VITE_*" variables as process.env.VITE_* in the browser

vite.cypress.config.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { defineConfig, mergeConfig, loadEnv } from "vite";
2+
import viteConfig from "./vite.config";
3+
4+
export default defineConfig(({ mode } = { mode: "development", command: "serve" }) =>
5+
mergeConfig(
6+
viteConfig({ mode, command: "serve" }),
7+
defineConfig({
8+
define: {
9+
"process.env": loadEnv("development", process.cwd(), "VITE"),
10+
},
11+
server: {
12+
/**
13+
* start the CT dev server on a different port than the full RWA
14+
* so users can switch between CT and E2E testing without having to
15+
* stop/start the RWA dev server.
16+
*/
17+
port: 3002,
18+
},
19+
})
20+
)
21+
);

0 commit comments

Comments
 (0)