WIP: Electron asset path and renderer build fixes

- Configure Vite renderer build for relative asset paths and explicit asset directory
- Remove baseURLForDataURL (caused Electron crash)
- Add debug logging for asset/network requests
- App now loads and assets are found, but some stylesheets may still be missing

Next: investigate CSS chunking/code splitting for Electron reliability.
This commit is contained in:
Matthew Raymer
2025-06-25 09:26:55 +00:00
parent fe55d0b431
commit f57458835b
4 changed files with 60 additions and 48 deletions

View File

@@ -4,6 +4,7 @@ import path from 'path';
export default defineConfig({
plugins: [vue()],
base: './',
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
@@ -12,10 +13,13 @@ export default defineConfig({
build: {
outDir: 'dist-electron/www',
emptyOutDir: false,
assetsDir: 'assets',
rollupOptions: {
input: path.resolve(__dirname, 'src/main.electron.ts'),
output: {
entryFileNames: 'main.electron.js'
entryFileNames: 'main.electron.js',
assetFileNames: 'assets/[name]-[hash][extname]',
chunkFileNames: 'assets/[name]-[hash].js'
}
},
commonjsOptions: {