feat: finally set up electron and vite together for build and live dev.
essentially vite and electron now can work together for live development of an app without dealing with possible dimension issues or any of the works
This commit is contained in:
parent
73cb54ad4f
commit
6c8ea122cd
3 changed files with 29 additions and 8 deletions
|
|
@ -8,7 +8,8 @@ export default defineConfig(({ mode }) => {
|
|||
if (mode === "renderer") {
|
||||
return {
|
||||
root: path.join(rootDirectory, "/src/renderer"),
|
||||
base: "/",
|
||||
base: path.join(rootDirectory, "/release/app/dist/renderer"),
|
||||
input: "index.html",
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
// NOTE: Very important to set tsconfigPaths = true
|
||||
|
|
@ -19,8 +20,8 @@ export default defineConfig(({ mode }) => {
|
|||
outDir: path.join(rootDirectory, "/release/app/dist/renderer"),
|
||||
emptyOutDir: true,
|
||||
rolldownOptions: {
|
||||
input: path.join(rootDirectory, "/src/renderer/index.html"),
|
||||
//output: { entryFileNames: "release/app/dist/renderer/renderer.js" }
|
||||
cwd: path.join(rootDirectory, "/src/renderer/"),
|
||||
output: { entryFileNames: "renderer.js" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue