chore: Update vite to 8 (#7600)

This commit is contained in:
Louis Lam
2026-07-16 12:42:31 +08:00
committed by GitHub
parent 9998be2aad
commit 55e07cf42a
6 changed files with 1454 additions and 1097 deletions
+1419 -1072
View File
File diff suppressed because it is too large Load Diff
+11 -11
View File
@@ -19,21 +19,21 @@
"fmt": "prettier --write \"**/*.{js,ts,vue,css,scss,json,md,yml,yaml}\"",
"lint:prod": "node --run lint:js-prod && node --run lint:style",
"dev": "concurrently -k -r \"wait-on tcp:3000 && node --run start-server-dev \" \"node --run start-frontend-dev\"",
"start-frontend-dev": "cross-env NODE_ENV=development vite --host --config ./config/vite.config.js",
"start-frontend-dev": "cross-env NODE_ENV=development vite --host",
"start": "node --run start-server",
"start-server": "node --import=tsx server/server.js",
"start-server-dev": "cross-env NODE_ENV=development tsx server/server.js",
"start-server-dev:watch": "cross-env NODE_ENV=development tsx --watch server/server.js",
"build": "vite build --config ./config/vite.config.js",
"build": "vite build",
"test": "node --run test-backend && node --run test-e2e",
"test-with-build": "node --run build && npm test",
"test-backend": "cross-env TEST_BACKEND=1 node --import=tsx --test --test-reporter=spec \"test/backend-test/**/*.{ts,js}\"",
"test-e2e": "playwright test --config ./config/playwright.config.js",
"test-e2e": "playwright test",
"test-e2e-local": "cross-env SKIP_TESTCONTAINER=1 npm run build && npm run test-e2e",
"test-e2e-ui": "playwright test --config ./config/playwright.config.js --ui --ui-port=51063",
"test-e2e-ui": "playwright test --ui --ui-port=51063",
"playwright-codegen": "playwright codegen localhost:3000 --save-storage=./private/e2e-auth.json",
"playwright-show-report": "playwright show-report ./private/playwright-report",
"vite-preview-dist": "vite preview --host --config ./config/vite.config.js",
"vite-preview-dist": "vite preview --host",
"build-docker-base": "docker buildx build -f docker/debian-base.dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:base3 --target base3 . --push",
"build-docker-base-slim": "docker buildx build -f docker/debian-base.dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:base3-slim --target base3-slim . --push",
"build-docker-builder-go": "docker buildx build -f docker/builder-go.dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:builder-go3 . --push",
@@ -169,8 +169,8 @@
"@types/web-push": "^3.6.4",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-vue": "~5.0.5",
"@vue/compiler-sfc": "~3.4.38",
"@vitejs/plugin-vue": "~6.0.7",
"@vue/compiler-sfc": "~3.5.39",
"@vuepic/vue-datepicker": "~3.4.8",
"aedes": "~1.0.0",
"bootstrap": "5.1.3",
@@ -194,8 +194,8 @@
"prettier": "^3.8.1",
"prismjs": "~1.30.0",
"qrcode": "~1.5.4",
"rollup-plugin-visualizer": "^5.14.0",
"sass": "~1.42.1",
"rollup-plugin-visualizer": "~7.0.1",
"sass": "^1.101.0",
"stylelint": "^15.11.0",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-standard": "~25.0.0",
@@ -204,9 +204,9 @@
"testcontainers": "^11.12.0",
"typescript": "~4.4.4",
"v-pagination-3": "~0.1.7",
"vite": "~5.4.21",
"vite": "~8.1.2",
"vite-plugin-compression": "^0.5.1",
"vue": "~3.5.28",
"vue": "~3.5.39",
"vue-chartjs": "~5.2.0",
"vue-contenteditable": "~3.0.4",
"vue-i18n": "~11.2.8",
@@ -5,8 +5,8 @@ export const url = `http://localhost:${port}`;
export default defineConfig({
// Look for test files in the "tests" directory, relative to this configuration file.
testDir: "../test/e2e/specs",
outputDir: "../private/playwright-test-results",
testDir: "test/e2e/specs",
outputDir: "private/playwright-test-results",
fullyParallel: false,
locale: "en-US",
maxFailures: 1,
@@ -25,7 +25,7 @@ export default defineConfig({
[
"html",
{
outputFolder: "../private/playwright-report",
outputFolder: "private/playwright-report",
open: "never",
},
],
@@ -69,6 +69,6 @@ export default defineConfig({
command: `node extra/remove-playwright-test-data.js && cross-env NODE_ENV=development node --import=tsx server/server.js --port=${port} --data-dir=./data/playwright-test`,
url,
reuseExistingServer: false,
cwd: "../",
cwd: "./",
},
});
+1 -1
View File
@@ -1,7 +1,7 @@
import { test, expect } from "@playwright/test";
import { restoreSqliteSnapshot } from "../util-test";
const serverUrl = require("../../../config/playwright.config.js").url;
const serverUrl = require("../../../playwright.config.js").url;
test.describe("/metrics basic auth", () => {
test.beforeEach(async () => {
+1 -1
View File
@@ -1,6 +1,6 @@
const fs = require("fs");
const path = require("path");
const serverUrl = require("../../config/playwright.config.js").url;
const serverUrl = require("../../playwright.config.js").url;
const dbPath = "./../../data/playwright-test/kuma.db";
+18 -8
View File
@@ -2,9 +2,8 @@ import vue from "@vitejs/plugin-vue";
import { defineConfig } from "vite";
import visualizer from "rollup-plugin-visualizer";
import viteCompression from "vite-plugin-compression";
const postCssScss = require("postcss-scss");
const postcssRTLCSS = require("postcss-rtlcss");
import postCssScss from "postcss-scss";
import postcssRTLCSS from "postcss-rtlcss";
const viteCompressionFilter = /\.(js|mjs|json|css|html|svg)$/i;
@@ -37,15 +36,26 @@ export default defineConfig({
map: false,
plugins: [postcssRTLCSS],
},
preprocessorOptions: {
scss: {
loadPaths: [process.cwd()],
quietDeps: true,
// Most of them are coming from boostrap unfortunately
silenceDeprecations: [
"import",
"global-builtin",
"if-function",
"color-functions",
"abs-percent",
"function-units",
],
},
},
},
build: {
commonjsOptions: {
include: [/.js$/],
},
rollupOptions: {
output: {
manualChunks(id, { getModuleInfo, getModuleIds }) {},
},
},
},
});