-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Hello,
I've tried numerous ways but I can't get the assets folder which contains the various vite assets to be compiled within the .asar.
Here is my vite.config. Can someone tell me what I'm doing wrong?
import vue from '@vitejs/plugin-vue'
import path from 'path'
import { defineConfig } from 'vite'
import electron from 'vite-plugin-electron/simple'
export default defineConfig(({ command }) => {
const isBuild = command === 'build'
return {
plugins: [
vue(),
electron({
main: {
entry: 'electron/main.js',
vite: {
build: {
sourcemap: !isBuild ? 'inline' : false,
minify: isBuild,
outDir: 'dist-electron/main',
rollupOptions: {
external: [],
},
},
},
},
renderer: {
vite: {
build: {
sourcemap: !isBuild ? 'inline' : false,
minify: isBuild,
outDir: 'dist-electron/renderer',
},
},
},
}),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
base: './',
server: {
open: true,
},
build: {
outDir: 'dist',
rollupOptions: {
input: path.resolve(__dirname, 'index.html'),
},
},
clearScreen: false,
}
})
Metadata
Metadata
Assignees
Labels
No labels