Vite Dev Server 404 #301
-
Been stuck on this for numerous hours today and yesterday, simply can't figure out what I'm doing wrong despite the numerous example projects :( Basically my issue I am trying to use the dev server, located at, process.env['ELECTRON_RENDERER_URL'], for development -- but no matter what I try I always get a 404 Here is my configuration: import commonjs from '@rollup/plugin-commonjs';
import { defineConfig, bytecodePlugin, externalizeDepsPlugin } from 'electron-vite'
import { resolve } from 'path'
export default defineConfig({
main: {
plugins: [commonjs()],
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'src/main/main.js')
}
}
}
},
renderer: {
root: '.',
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'src/renderer/main/index.html'),
debugger: resolve(__dirname, 'src/renderer/debugger/index.html')
}
}
}
}
}); And here is my file structure:
Does anyone have any idea as to why my Vite server refuses to serve my content defined in 'input'? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So, the answer here is that your rollupOptions.input are ONLY used when building, not the dev server In my case, the answer to load from |
Beta Was this translation helpful? Give feedback.
So, the answer here is that your rollupOptions.input are ONLY used when building, not the dev server
In my case, the answer to load from
${process.env['ELECTRON_RENDERER_URL']}/src/renderer/main/index.html