-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: ssr.external/noExternal should apply to packageName #9146
Conversation
✅ Deploy Preview for vite-docs-main canceled.
|
cc @benmccann @dominikg @bluwy We should check vite-ecosystem-ci and merge this PR, so it is included in Monday's release |
@@ -120,13 +120,17 @@ export function createIsConfiguredAsSsrExternal( | |||
return (id: string) => { | |||
const { ssr } = config | |||
if (ssr) { | |||
if (ssr.external?.includes(id)) { | |||
const pkgName = getNpmPackageName(id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getNpmPackageName returns ''
for id='/some/path/with/leading/slash'
which is falsy and returns undefined then. This is what we want, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only bare imports reach this check, so this is not possible 👍🏼
vite-ecosystem-ci run for this PR https://github.com/vitejs/vite-ecosystem-ci/actions/runs/2679454666, that is all green for prev working CIs |
Merging as this is an important fix for downstream |
Description
Fixes
Also fixes https://github.com/Cluster2a/chartjsError, where we need now to add because of deps being external by default:
What is the purpose of this pull request?