Skip to content

fix(client): fix vite error path #17744

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

Merged
merged 2 commits into from
Jul 23, 2024
Merged

Conversation

coderwei99
Copy link
Contributor

Description

fix #17656

This pr fix embedded Vite error path.

Copy link

stackblitz bot commented Jul 23, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@@ -82,7 +84,7 @@ export function errorMiddleware(
'\\u003c',
)}
try {
const { ErrorOverlay } = await import('/@vite/client')
const { ErrorOverlay } = await import(${path.posix.join(server.config.base, CLIENT_PUBLIC_PATH)})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing quotes around the specifier, you can wrap it with a JSON.stringify() so that it generates quotes and escape them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. thanks

@bluwy
Copy link
Member

bluwy commented Jul 23, 2024

/ecosystem-ci run

@vite-ecosystem-ci
Copy link

📝 Ran ecosystem CI on 6bf04a6: Open

suite result latest scheduled
astro failure failure
nuxt failure failure
sveltekit failure failure
vike failure failure
vite-plugin-react-pages failure failure
vitest failure failure

analogjs, histoire, ladle, laravel, marko, previewjs, quasar, qwik, rakkas, remix, unocss, vite-plugin-pwa, vite-plugin-react, vite-plugin-react-swc, vite-plugin-svelte, vite-plugin-vue, vite-setup-catalogue, vitepress

@patak-dev patak-dev merged commit 3c1bde3 into vitejs:main Jul 23, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error Middleware import does not respect server.origin or base.
3 participants