-
Notifications
You must be signed in to change notification settings - Fork 163
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
fix: [vite-plugin-hot] Failed to import "/@vite/client" when using nuxt.config "app/buildAssetsDir" #384
Comments
Hey @edgarrroussille, what version of devtools are you using? It should be fixed in the latest version #375 |
@arashsheyda I'm encountering the same issue even on edge release that implements #375. I still observe the following error:
It appears {
"baseURL": "/__nuxt_devtools__/client",
"buildAssetsDir": "/_nuxt/",
"cdnURL": ""
} Yet evaluating the config in the browser equates to: {
"baseURL": "/",
"buildAssetsDir": "/customdir/",
"cdnURL": ""
} |
Hey @arashsheyda I'm using v0.7.6, same as in repro link |
Aww I found the problem, I will open PR as soon as possible. thanks |
Is it related to the window context? Perhaps the config is referring to the devtools window rather than the parent? |
exactly! PR welcome if you want |
Happy to spin up a PR later today 👍 |
🐛 The bug
Nuxt devtools doesn't load and console throws some errors, especially the
[vite-plugin-hot] Failed to import "/@vite/client"
one. Even after this commit.We're using a custom value for buildAssetsDir.
Solution: when commenting out this buildAssetsDir, everything works. So maybe just getting that value from config when loading the Vite client ?
🛠️ To reproduce
https://stackblitz.com/edit/github-cwjhut?file=nuxt.config.ts
🌈 Expected behavior
Devtools should load even when using a custom
buildAssetsDir
pathℹ️ Additional context
No response
The text was updated successfully, but these errors were encountered: