Skip to content

Commit 66f05ba

Browse files
committed
chore: added react compiler and fixed url to manage pads
1 parent ade5fba commit 66f05ba

4 files changed

Lines changed: 120 additions & 2 deletions

File tree

admin/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
"@types/react-dom": "^19.2.0",
2121
"@typescript-eslint/eslint-plugin": "^8.43.0",
2222
"@typescript-eslint/parser": "^8.43.0",
23+
"@vitejs/plugin-react": "^5.0.4",
24+
"babel-plugin-react-compiler": "19.1.0-rc.3",
2325
"eslint": "^9.36.0",
2426
"eslint-plugin-react-hooks": "^6.1.0",
2527
"eslint-plugin-react-refresh": "^0.4.23",
@@ -34,6 +36,7 @@
3436
"socket.io-client": "^4.8.1",
3537
"typescript": "^5.9.3",
3638
"vite": "npm:rolldown-vite@latest",
39+
"vite-plugin-babel": "^1.3.2",
3740
"vite-plugin-static-copy": "^3.1.3",
3841
"zustand": "^5.0.8"
3942
},

admin/src/pages/PadPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export const PadPage = ()=>{
255255
<IconButton icon={<FileStack/>} title={<Trans i18nKey="ep_admin_pads:ep_adminpads2_cleanup"/>} onClick={()=>{
256256
cleanupPad(pad.padName)
257257
}}/>
258-
<IconButton icon={<Eye/>} title="view" onClick={()=>window.open(`/p/${pad.padName}`, '_blank')}/>
258+
<IconButton icon={<Eye/>} title={<Trans i18nKey="index.createOpenPad"/>} onClick={()=>window.open(`../../p/${pad.padName}`, '_blank')}/>
259259
</div>
260260
</td>
261261
</tr>

admin/vite.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { defineConfig } from 'vite'
22
import {viteStaticCopy} from "vite-plugin-static-copy";
3+
import react from '@vitejs/plugin-react';
34

45
// https://vitejs.dev/config/
56
export default defineConfig({
@@ -10,7 +11,10 @@ export default defineConfig({
1011
dest: ''
1112
}
1213
]
13-
})],
14+
}), react({
15+
babel: {
16+
plugins: ['babel-plugin-react-compiler'],
17+
}})],
1418
base: '/admin',
1519
build:{
1620
outDir: '../src/templates/admin',

pnpm-lock.yaml

Lines changed: 111 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)