forked from jsnbuchanan/crowd-funder-for-time-pwa
feat: modernize Electron build process with Vite-based CSS injection
- Replace manual CSS injection hack with Vite plugin - Configure Vite to handle both main process and renderer builds - Update build scripts to work with proper Vite output structure - Remove fix-inject-css.js post-build script - Update BUILDING.md documentation - Add build-modernization-context.md for future reference Technical changes: - vite.config.electron.mts: Add electron-css-injection plugin and proper output config - scripts/build-electron.js: Simplify to work with Vite-generated files - BUILDING.md: Update Electron build documentation - doc/build-modernization-context.md: Document context and decisions Security/maintenance improvements: - Eliminate manual file manipulation hacks - Ensure deterministic, reproducible builds - Centralize build logic in Vite configuration - Improve developer experience and CI/CD compatibility Author: Matthew Raymer
This commit is contained in:
@@ -14,12 +14,14 @@ export default defineConfig({
|
||||
outDir: 'dist-electron/www',
|
||||
emptyOutDir: false,
|
||||
assetsDir: 'assets',
|
||||
cssCodeSplit: false,
|
||||
rollupOptions: {
|
||||
input: path.resolve(__dirname, 'src/main.electron.ts'),
|
||||
output: {
|
||||
entryFileNames: 'main.electron.js',
|
||||
assetFileNames: 'assets/[name]-[hash][extname]',
|
||||
chunkFileNames: 'assets/[name]-[hash].js'
|
||||
chunkFileNames: 'assets/[name]-[hash].js',
|
||||
manualChunks: undefined
|
||||
}
|
||||
},
|
||||
commonjsOptions: {
|
||||
|
||||
Reference in New Issue
Block a user