Page navigation with Nuxt3/Electron not working – not allowed to load local resource with ‘#’

I am using electron-forge to build a project using this nuxt-electron module with

npx nuxi generate && electron-forge make

the build works fine and I am also able to start the app and the first page (.output/public/index.html) loads fine but when trying to navigate to a different page using this.$router.push('/mypage/subpage') I just get a blank page and the error:

chromewebdata/:1 Not allowed to load local resource: file:///[app-path]/resources/app.asar/.output/public/#/mypage/subpage

with the folder structure in nuxt like so

.
└── pages/
    └── mypage/
        └── subpage.vue

I suspect that there is a problem in my nuxt build config or the router since ‘#/mypage/subpage’ is not a valid file path and the build output (in the app.asar) looks like this:

.
├── .output/
│   ├── public/
│   │   ├── _nuxt/
│   │   │   ├── [.js files]
│   │   │   └── [.css files]
│   │   ├── 200.html
│   │   ├── 404.html
│   │   └── index.html
│   └── nitro.json
├── .dist-electron/
│   └── ...
├── .node_modules/
│   └── ...
└── pacakge.json

snapshop of part of the _nuxt folder:

this is my current nuxt config file:

import fs from 'node:fs'
import path from 'node:path'
import process from 'node:process'
import pkg from './package.json'

import { defineNuxtConfig } from 'nuxt/config'
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
import eslint from 'vite-plugin-eslint2'

const __dirname = import.meta.url
fs.rmSync(path.join(__dirname, '..', 'dist-electron'), { recursive: true, force: true })

export default defineNuxtConfig({
  app: {
    head: {
      meta: [
        { charset: 'utf-8' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1' },
        {
          hid: 'description',
          name: 'description',
          content: process.env.npm_package_description || '',
        },
      ],
      link: [{ rel: 'icon', type: 'image/x-icon', href: 'static/favicon.ico' }],
    },
  },
  devtools: { enabled: process.env.NODE_ENV === 'development' },
  modules: [
    'nuxt-electron',
    '@nuxt/eslint',
    '@pinia/nuxt',
    (_options, nuxt) => {
      if (!nuxt.options.dev) {
        nuxt.options.nitro.runtimeConfig ??= {}
        nuxt.options.nitro.runtimeConfig.app ??= {}
        nuxt.options.nitro.runtimeConfig.app.baseURL = './'
      }
      nuxt.hooks.hook('vite:extendConfig', (config) => {
        // @ts-expect-error
        config.plugins.push(vuetify({ autoImport: true }))
      })
    },
  ],
  electron: {
    disableDefaultOptions: true,
    build: [
      {
        // Main-Process entry file of the Electron App.
        entry: process.env.NODE_ENV !== 'testing' ? 'electron/main.mts' : 'electron/testing.mts',
      },
      {
        entry: 'electron/preload.mts',
        onstart(args) {
          // Notify the Renderer-Process to reload the page when the Preload-Scripts build is complete,
          // instead of restarting the entire Electron App.
          args.reload()
        },
      },
    ],
  },
  ssr: false,
  router: {
    options: {
      hashMode: true,
    },
  },
  build: {
    transpile: ['vuetify'],
  },
  vite: {
    build: {
      minify: process.env.NODE_ENV === 'production',
      rollupOptions: {
        external: ['fsevents', ...Object.keys('dependencies' in pkg ? pkg.dependencies : {})],
      },
    },
    vue: {
      template: {
        transformAssetUrls,
      },
    },
    plugins: [
      eslint({
        fix: true,
        cache: false,
      }),
    ],
    // TODO: check additionalData @use statements
    css: {
      preprocessorOptions: {
        scss: {
          additionalData: `
        @use "~/assets/scss/abstracts/_index.scss" as *;
        @use "~/assets/scss/main.scss"  as *;
        `,
        },
      },
    },
  },
})

I have already tried a bunch of solutions for similar Not allowed to load local resource error messages but most are related to not being able to load the initial index.html files etc. not the page navigation.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật