alex8088 / electron-vite-boilerplate

Comprehensive and security Electron template (TypeScript + Vue3 + Vite).
https://electron-vite.org
147 stars 28 forks source link

Vue router + electron vite #7

Closed mb-mysterdev closed 1 year ago

mb-mysterdev commented 1 year ago

Hello Alex, First of all, thank you for the work you have done. your repo is the best for the electron part with vite and vuejs.

But just a question when I configure the Router vuejs and I build it does not work knowing that by doing a yarn dev it works very well.

it works with yarn start and yarn dev but it doesn't work after build (linux). I don't get any error but anything related to router-view or router link doesn't work

do you have an idea ? thank you

alex8088 commented 1 year ago

@mb-mysterdev

for production:

mainWindow.loadFile(path.join(__dirname, '../renderer/index.html'), { hash: '/main' })

The BrowserWindow loadFile can specify the hash parameter

mb-mysterdev commented 1 year ago

thank you, it works

Abolfazl2049 commented 5 months ago

thank you, it works

hey , im having problem with making a multiple page app. can you explain how did you configured vue-router ? thank you