Fix: 修复依赖相关问题
This commit is contained in:
@ -18,10 +18,10 @@ ipcMain.on('play-sound', (_, soundFile) => {
|
||||
|
||||
// 判断是开发环境还是生产环境
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 开发环境下,路径指向 src
|
||||
soundPath = path.join(__dirname, '../renderer/src/assets/sounds', soundFile);
|
||||
// 在开发模式下,直接指向 renderer/public 里的文件
|
||||
soundPath = path.join(__dirname, '../renderer/public/assets/sounds', soundFile);
|
||||
} else {
|
||||
// 生产环境下,路径指向打包后的 dist 目录
|
||||
// 在生产模式下,Vite 会把 public 里的文件复制到 dist 文件夹
|
||||
soundPath = path.join(__dirname, '../renderer/dist/assets/sounds', soundFile);
|
||||
}
|
||||
|
||||
|
1450
package-lock.json
generated
1450
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@ -19,19 +19,17 @@
|
||||
"url": "https://github.com/Kisechan/Pet/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Kisechan/Pet#readme",
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^6.0.1",
|
||||
"electron": "^37.2.5",
|
||||
"vue": "^3.5.18",
|
||||
"concurrently": "^8.0.0",
|
||||
"vite": "^5.0.0",
|
||||
"wait-on": "^7.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"electron": "^37.2.5",
|
||||
"vue": "^3.5.18",
|
||||
"fs-extra": "^11.3.1",
|
||||
"howler": "^2.2.4",
|
||||
"path": "^0.12.7"
|
||||
"vue": "^3.5.18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^6.0.1",
|
||||
"concurrently": "^9.2.0",
|
||||
"cross-env": "^10.0.0",
|
||||
"electron": "^37.2.6",
|
||||
"vite": "^7.1.1",
|
||||
"wait-on": "^8.0.4"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 6.5 MiB After Width: | Height: | Size: 6.5 MiB |
Reference in New Issue
Block a user