Skip to content

Commit 348c8ac

Browse files
authored
Merge pull request #934 from gotify/renovate/vite-8.x
chore(deps): update dependency vite to v8 - abandoned
2 parents b973bf5 + c15afa3 commit 348c8ac

File tree

3 files changed

+356
-7
lines changed

3 files changed

+356
-7
lines changed

ui/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"remark-gfm": "^4.0.1",
3535
"remove-markdown": "^0.6.2",
3636
"tss-react": "^4.9.19",
37-
"vite": "^7.0.6",
37+
"vite": "^8.0.8",
3838
"vitest": "^4.0.0"
3939
},
4040
"scripts": {
@@ -47,7 +47,9 @@
4747
"testformat": "prettier \"src/**/*.{ts,tsx}\" --list-different"
4848
},
4949
"devDependencies": {
50+
"@babel/plugin-proposal-decorators": "^7.29.0",
5051
"@eslint/js": "^10.0.0",
52+
"@rolldown/plugin-babel": "^0.2.2",
5153
"@types/notifyjs": "^3.0.5",
5254
"@types/react": "^19.1.9",
5355
"@types/react-dom": "^19.1.7",

ui/vite.config.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
import {defineConfig} from 'vite';
22
import react from '@vitejs/plugin-react';
3+
import babel from '@rolldown/plugin-babel';
34

45
const GOTIFY_SERVER_PORT = process.env.GOTIFY_SERVER_PORT ?? '80';
56

7+
function decoratorPreset(options: Record<string, unknown>) {
8+
return {
9+
preset: () => ({
10+
plugins: [['@babel/plugin-proposal-decorators', options]],
11+
}),
12+
rolldown: {
13+
filter: {code: '@'},
14+
},
15+
};
16+
}
17+
618
export default defineConfig({
719
base: './',
820
build: {
@@ -11,7 +23,12 @@ export default defineConfig({
1123
sourcemap: false,
1224
assetsDir: 'static',
1325
},
14-
plugins: [react()],
26+
plugins: [
27+
react(),
28+
babel({
29+
presets: [decoratorPreset({version: '2022-03'})],
30+
}),
31+
],
1532
define: {
1633
// Some libraries use the global object, even though it doesn't exist in the browser.
1734
// Alternatively, we could add `<script>window.global = window;</script>` to index.html.

0 commit comments

Comments
 (0)