Repository: traefik/traefik (language: go)

Issue:
Dashboard No longer working
### Welcome!

- [X] Yes, I've searched similar issues on [GitHub](https://github.com/traefik/traefik/issues) and didn't find any.
- [X] Yes, I've searched similar issues on the [Traefik community forum](https://community.traefik.io) and didn't find any.

### What did you do?

Upgrade Docker Image to v3.0.0-rc2

### What did you see instead?

Dashboard No longer loading - assets Return 404 Not found

### What version of Traefik are you using?

Version:      3.0.0-rc2
Codename:     beaufort
Go version:   go1.22.1
Built:        2024-03-12T14:22:37Z
OS/Arch:      linux/amd64

### What is your environment & configuration?

```yaml
Nothing special
```

Add more configuration information here.


### If applicable, please paste the log output in DEBUG level

_No response_


Discussion / hints:
Having the same issue
`Failed to load resource: the server responded with a status of 404 ()`

`Refused to apply style from 'https://URL/assets/index.7f8343df.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.`

Getting the above errors
Having the same issue.

FYI this is also reported in traefik community [discourse](https://community.traefik.io/t/dashboard-does-not-load-after-v3-rc2-update/21846?u=onlinejudge95)
Same issue.

Browser developer console reports back:

````
Refused to apply style from '/assets/index.7f8343df.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
````

Browsing `/assets/index.30be398d.js` leads to `404 Not Found`.
Hi all,

Thanks for reporting the issue. We were able to reproduce this issue by exposing the dashboard with a router. The issue is not present if you have `--api.insecure` and your are not using a router to expose the dashboard.

The issue has been introduced by https://github.com/traefik/traefik/pull/10416

Fix patch:
diff --git a/webui/quasar.conf.js b/webui/quasar.conf.js
index 29d00f12a9..930136d3ad 100644
--- a/webui/quasar.conf.js
+++ b/webui/quasar.conf.js
@@ -120,6 +120,11 @@ module.exports = configure(function (ctx) {
     supportIE: false,
 
     build: {
+      // Needed to have relative assets in the index.html
+      // https://github.com/quasarframework/quasar/issues/8513#issuecomment-1127654470
+      extendViteConf(viteConf, {isServer, isClient}) {
+        viteConf.base = "";
+      },
      viteVuePluginOptions: {
         template: {
           compilerOptions: {


Test patch: