forked from jsnbuchanan/crowd-funder-for-time-pwa
- 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.
29 lines
677 B
TypeScript
29 lines
677 B
TypeScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
base: './',
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist-electron/www',
|
|
emptyOutDir: false,
|
|
assetsDir: 'assets',
|
|
rollupOptions: {
|
|
input: path.resolve(__dirname, 'src/main.electron.ts'),
|
|
output: {
|
|
entryFileNames: 'main.electron.js',
|
|
assetFileNames: 'assets/[name]-[hash][extname]',
|
|
chunkFileNames: 'assets/[name]-[hash].js'
|
|
}
|
|
},
|
|
commonjsOptions: {
|
|
transformMixedEsModules: true
|
|
}
|
|
}
|
|
});
|