i tried to change my files name inside the main folder to:
app.ts
windows.ts
ipcMain.ts
files name (img)
i ran into this problem, and honestly, I’m not familiar with configuring Rollup or Vite.js because I haven’t used them before. So, I need some help with this and a quick explanation about how to configure Vite and Rollup regarding the electron-vite library.
I tried to modify it according to what is explained in Rollup and Vite, but I encountered other errors, such as not being able to place the files app.ts, windows.ts, or ipcMain.ts. I searched a lot for solutions but couldn’t find any. Also, I’m not proficient in reading English and face difficulties while reading, as reading in general is challenging for me. Please help.
error message after editing the config to try solve it
NOTE!: im using this Electron-vite library NOT this library
here’s my electron.vite.config file :
import { resolve } from "path"
import { defineConfig, externalizeDepsPlugin } from "electron-vite"
import react from "@vitejs/plugin-react"
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()]
},
preload: {
plugins: [externalizeDepsPlugin()]
},
renderer: {
resolve: {
alias: {
"@renderer": resolve("src/renderer/frontend")
}
},
plugins: [react()]
}
})
I’m trying to solve a problem that I encountered, and I’ve searched for it a lot but couldn’t find a clear solution. Also, I’m unfamiliar with some libraries and need a clear and concise explanation of my problem to understand it better and pay attention to it in the future.
Weelpert is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.