mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-23 01:50:13 +08:00
chore: update electron configuration and add debug script (#6361)
* chore: update electron configuration and add debug script - Added sourcemap generation for development builds in electron.vite.config.ts. - Introduced a new debug script in package.json for easier debugging with remote inspection. * docs: add debug section to development documentation - Introduced a new section for debugging instructions, including the command to run the debug script and how to access the Chrome inspect tool.
This commit is contained in:
parent
2bf2e2febb
commit
92aa9f9c8e
@ -37,6 +37,14 @@ yarn install
|
||||
yarn dev
|
||||
```
|
||||
|
||||
### Debug
|
||||
|
||||
```bash
|
||||
yarn debug
|
||||
```
|
||||
|
||||
Then input chrome://inspect in browser
|
||||
|
||||
### Test
|
||||
|
||||
```bash
|
||||
|
||||
@ -38,7 +38,11 @@ export default defineConfig({
|
||||
build: {
|
||||
rollupOptions: {
|
||||
external: ['@libsql/client']
|
||||
}
|
||||
},
|
||||
sourcemap: process.env.NODE_ENV === 'development'
|
||||
},
|
||||
optimizeDeps: {
|
||||
noDiscovery: process.env.NODE_ENV === 'development'
|
||||
}
|
||||
},
|
||||
preload: {
|
||||
@ -47,6 +51,9 @@ export default defineConfig({
|
||||
alias: {
|
||||
'@shared': resolve('packages/shared')
|
||||
}
|
||||
},
|
||||
build: {
|
||||
sourcemap: process.env.NODE_ENV === 'development'
|
||||
}
|
||||
},
|
||||
renderer: {
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
"scripts": {
|
||||
"start": "electron-vite preview",
|
||||
"dev": "electron-vite dev",
|
||||
"debug": "electron-vite -- --inspect --sourcemap --remote-debugging-port=9222",
|
||||
"build": "npm run typecheck && electron-vite build",
|
||||
"build:check": "yarn test && yarn typecheck && yarn check:i18n",
|
||||
"build:unpack": "dotenv npm run build && electron-builder --dir",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user