alex8088 / quick-start

An easy way to start a front-end project.
MIT License
248 stars 34 forks source link

Help wanted - how to load an additonal html #8

Closed stuartambient closed 1 year ago

stuartambient commented 1 year ago

Help wanted

This is using React in renderer.
I want to use a child.html like index.html child.html would have a different mount point for what I call ChildApp.jsx. How to get this working with the './out/ ?

My child.html is sitting in the same place as my index ./src/renderer but Vite doesn't seem to crawl and find the child.html

Used Scaffolding

create-electron

alex8088 commented 1 year ago

the scaffolding tool for electron-vite. see https://evite.netlify.app/ https://evite.netlify.app/guide/dev.html

stuartambient commented 1 year ago

the scaffolding tool for electron-vite. see https://evite.netlify.app/ https://evite.netlify.app/guide/dev.html

I already have the project. I've added an additional html file and want to know how it gets rolled into the .out directory since that is the main entry point.

alex8088 commented 1 year ago

Multiple entry points can be configured in the configuration file. see https://evite.netlify.app/guide/dev.html multiple windows part

stuartambient commented 1 year ago

does this section remain then and I add in the rollup options ?


    resolve: {
      alias: {
        '@renderer': resolve('src/renderer/src')
      }
    },```

It's unclear what this code is doing.
alex8088 commented 1 year ago

alias is common in building tools. You can learn more from the documents of rollup or vite.

stuartambient commented 1 year ago

Ok, got things working without a glitch! Thank you!