Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links to static files in public not working at router depth 2 or more with history router mode #17947

Open
drgrice1 opened this issue Apr 1, 2025 · 0 comments

Comments

@drgrice1
Copy link

drgrice1 commented Apr 1, 2025

What happened?

Links to files in /public do not work when placed on a page that has a router depth of 2 or more when vueRouterMode is set to history. For example, make three nested routes with paths /, /depth1, and /depth1/depth2, and place an image on all three pages with the image file in /public. On the / and /depth1 pages, the image is shown, but on the /depth1/depth2 page it is not.

What did you expect to happen?

I expect the image to be shown on all pages as it was with previous versions of quasar and @quasar/app-webpack (this also happens with recent versions of @quasar/app-vite). I am not entirely certain which packages and versions are at fault in this. I have had trouble locking that down. I know that with [email protected] and @quasar/[email protected] this did not happen.

Reproduction URL

https://stackblitz.com/edit/quasarframework-stackblitz-templates-sfuxxbub

How to reproduce?

Open the "Depth 0 Page", "Depth 1Page", and "Depth 2Page". On the first two pages the image is shown. On the "Depth 2 Page" the image is not, and instead the "alt" text is shown.

Flavour

Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite), SPA Mode, Components (quasar)

Platforms/Browsers

Firefox

Quasar info output

Operating System - Linux(5.0 (X11)) - linux/x64
NodeJs - 20.19.0

Global packages
  NPM - 10.8.2
  yarn - 1.22.19
  pnpm - 8.15.6
  bun - Not installed
  @quasar/cli - undefined
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.18.1 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-webpack - 4.2.0 -- Quasar Framework App CLI with Webpack
  @quasar/extras - 1.16.17 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.5.13 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.5.0
  pinia - Not installed
  eslint - 9.23.0 -- An AST-based pattern checker for JavaScript.
  esbuild - 0.25.2 -- The cross-platform WebAssembly binary for esbuild, a JavaScript bundler.
  typescript - Not installed
  @babel/core - 7.26.10 -- Babel compiler core.
  webpack - 5.98.0 -- Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
  webpack-dev-server - 5.2.1 -- Serves a webpack app. Updates the browser on changes.
  workbox-webpack-plugin - Not installed
  register-service-worker - Not installed
  electron - Not installed
  @electron/packager - Not installed
  electron-builder - Not installed
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Networking
  Host - quasarframeworkstackblitztempl-mxzx
  en0 - 192.168.1.104

Relevant log output

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant