Migrate to preact and update react-router.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Madeorsk 2024-11-29 17:43:56 +01:00
parent 43c0297b04
commit ff6e8be4ae
Signed by: Madeorsk
GPG key ID: 677E51CA765BB79F
3 changed files with 444 additions and 293 deletions

View file

@ -26,25 +26,27 @@
"uuid": "^10.0.0" "uuid": "^10.0.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.26.0",
"@phosphor-icons/react": "^2.1.7", "@phosphor-icons/react": "^2.1.7",
"@preact/compat": "^18.3.1",
"@preact/preset-vite": "^2.9.2",
"@types/babel__core": "^7",
"@types/node": "^22.7.4", "@types/node": "^22.7.4",
"@types/react": "^18.3.10", "@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"@types/uuid": "^10", "@types/uuid": "^10",
"@vitejs/plugin-react": "^4.3.0",
"less": "^4.2.0", "less": "^4.2.0",
"react": "^18.3.1", "preact": "^10.25.0",
"react-dom": "^18.3.1", "react-router-dom": "^7.0.1",
"react-router-dom": "^6.26.2",
"typescript": "^5.6.2", "typescript": "^5.6.2",
"vite": "^5.4.8", "vite": "^5.4.8",
"vite-plugin-dts": "^4.2.2" "vite-plugin-dts": "^4.2.2"
}, },
"peerDependencies": { "peerDependencies": {
"@phosphor-icons/react": "^2.1.7", "@phosphor-icons/react": "^2.1.7",
"react": "^18.3.1", "react-router-dom": "^7.0.1",
"react-dom": "^18.3.1", "@preact/compat": "^18.3.1",
"react-router-dom": "^6.24.1" "preact": "^10.25.0"
}, },
"packageManager": "yarn@4.5.0" "packageManager": "yarn@4.5.0"
} }

View file

@ -1,6 +1,6 @@
import {ConfigEnv, defineConfig, UserConfig} from "vite"; import {ConfigEnv, defineConfig, UserConfig} from "vite";
import dts from "vite-plugin-dts"; import dts from "vite-plugin-dts";
import react from "@vitejs/plugin-react"; import preact from "@preact/preset-vite";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
@ -16,12 +16,12 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
fileName: "index", fileName: "index",
}, },
rollupOptions: { rollupOptions: {
external: ["react", "react-dom", "react-router-dom", "@phosphor-icons/react"], external: ["preact", "@preact/compat", "react-router-dom", "@phosphor-icons/react"],
}, },
}, },
plugins: [ plugins: [
react(), preact(),
dts({ dts({
rollupTypes: true, rollupTypes: true,
insertTypesEntry: true, insertTypesEntry: true,

715
yarn.lock

File diff suppressed because it is too large Load diff