René's URL Explorer Experiment


Title: Dev: `better-auth/client/plugins` fails to resolve when auth is enabled (the `better-auth/client` alias matches it as a prefix) · Issue #565 · voidzero-dev/void · GitHub

Open Graph Title: Dev: `better-auth/client/plugins` fails to resolve when auth is enabled (the `better-auth/client` alias matches it as a prefix) · Issue #565 · voidzero-dev/void

X Title: Dev: `better-auth/client/plugins` fails to resolve when auth is enabled (the `better-auth/client` alias matches it as a prefix) · Issue #565 · voidzero-dev/void

Description: Description With auth enabled, void dev aliases better-auth/client (and /react, /vue, /svelte, /solid) to absolute file paths. A string alias in Vite also matches subpaths, so better-auth/client/plugins, where Better Auth's client plugin...

Open Graph Description: Description With auth enabled, void dev aliases better-auth/client (and /react, /vue, /svelte, /solid) to absolute file paths. A string alias in Vite also matches subpaths, so better-auth/client/pl...

X Description: Description With auth enabled, void dev aliases better-auth/client (and /react, /vue, /svelte, /solid) to absolute file paths. A string alias in Vite also matches subpaths, so better-auth/client/pl...

Opengraph URL: https://github.com/voidzero-dev/void/issues/565

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dev: `better-auth/client/plugins` fails to resolve when auth is enabled (the `better-auth/client` alias matches it as a prefix)","articleBody":"## Description\n\nWith auth enabled, `void dev` aliases `better-auth/client` (and `/react`, `/vue`, `/svelte`, `/solid`) to absolute file paths. A string alias in Vite also matches subpaths, so `better-auth/client/plugins`, where Better Auth's client plugins such as `adminClient()` live, is rewritten to `…/better-auth/dist/client/index.mjs/plugins`, which doesn't exist. Any app that passes a Better Auth client plugin to `createAuthClient` breaks in dev. `void build` is not affected, because the alias is only added for `serve`.\n\n## Steps to reproduce\n\n1. Enable auth in `void.config.ts`: `auth: { providers: ['email'] }`.\n2. Add `better-auth` as a dependency (the same version Void uses).\n3. Create a client with a plugin and import it from a page:\n\n   ```ts\n   // src/lib/auth-client.ts\n   import { adminClient } from 'better-auth/client/plugins';\n   import { createAuthClient } from 'void/client';\n\n   export const authClient = createAuthClient({\n     basePath: '/api/auth',\n     plugins: [adminClient()],\n   });\n   ```\n\n4. Run `void dev` and open that page.\n\n## Actual behavior\n\n- Client: `Pre-transform error: Failed to resolve import \"better-auth/client/plugins\" from \"src/lib/auth-client.ts\". Does the file exist?`\n- SSR: the page returns 500 with `Error: No such module \"workers/runner-worker/file:/…/better-auth/dist/client/plugins/index.mjs\"`.\n\n## Expected behavior\n\n`better-auth/client/plugins` resolves to `better-auth/dist/client/plugins/index.mjs`, as it does in `void build` and in Node.\n\n## Cause\n\n`packages/void/src/plugin-routing.ts` (main @ `6ba3dbcc3a`, lines 616–622):\n\n```ts\nconst betterAuthSubpaths = ['client', 'react', 'vue', 'svelte', 'solid'];\nconst resolvedAliases = betterAuthSubpaths.flatMap((sub) => {\n  try {\n    return [{ find: `better-auth/${sub}`, replacement: resolveFile(`better-auth/${sub}`) }];\n  } catch {\n    return [];\n  }\n});\n```\n\nA string `find` matches the exact id and any id that starts with `find + '/'`, replacing the prefix. `resolveFile('better-auth/client')` is `…/dist/client/index.mjs`, so `better-auth/client/plugins` becomes `…/dist/client/index.mjs/plugins`.\n\n## Possible fix\n\nAnchor the patterns so they only match the exact specifier, and pre-resolve `client/plugins` too if it should avoid the lazy-discovery reload the comment mentions:\n\n```ts\nconst betterAuthSubpaths = ['client', 'client/plugins', 'react', 'vue', 'svelte', 'solid'];\n// …\nreturn [{ find: new RegExp(`^better-auth/${sub}$`), replacement: resolveFile(`better-auth/${sub}`) }];\n```\n\n## Workaround\n\nA plugin listed after `voidPlugin()` adds an exact-match alias. Aliases from a later plugin's `config` hook are tried first, so this one wins:\n\n```ts\n// vite.config.ts\nimport { createRequire } from 'node:module';\nimport type { Plugin } from 'vite-plus';\n\nconst require = createRequire(import.meta.url);\n\nfunction betterAuthClientPlugins(): Plugin {\n  return {\n    name: 'better-auth-client-plugins',\n    config: () => ({\n      resolve: {\n        alias: [\n          {\n            find: /^better-auth\\/client\\/plugins$/,\n            replacement: require.resolve('better-auth/client/plugins'),\n          },\n        ],\n      },\n    }),\n  };\n}\n\n// plugins: [voidPlugin(), voidReact(), betterAuthClientPlugins()]\n```\n\n## Related\n\n#554 edits the same block (adds `authConfigEnvironmentConfig` to the returned config) but keeps the prefix aliases.\n\n## Environment\n\n- void 1.2.1 (also on 1.1.12), better-auth 1.7.11\n- vite-plus 1.3.0, Node 22.23.3, macOS 26.6\n","author":{"url":"https://github.com/karthickeyan-dev","@type":"Person","name":"karthickeyan-dev"},"datePublished":"2026-10-23T08:51:00Z","url":"https://github.com/voidzero-dev/void/issues/565"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ee572a9b-4857-ffc6-9933-154decf86611
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB9D4:1F41:9F24F4:D19DDD:6AFBA693
html-safe-noncea1bcb9ee9071728f69ebf20a15e2c699c29dcf11bb5c54449e29ee1ef803af34
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUQ0OjFGNDE6OUYyNEY0OkQxOURERDo2QUZCQTY5MyIsInZpc2l0b3JfaWQiOiI4OTQ3MjY1MzMyOTcyMzMyNjkxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacefc7378fc7eb58a1bec5cb7fe364e24585635910511bf10c9c11ddddd7108228
hovercard-subject-tagissue:5994820068
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/voidzero-dev/void/565/issue_layout
twitter:imagehttps://opengraph.githubassets.com/21230f3c5dcae9cf89994ecb1839cfd05cb1ee50268b96c0ec0de5a7fdde3ccf/voidzero-dev/void/issues/565
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/21230f3c5dcae9cf89994ecb1839cfd05cb1ee50268b96c0ec0de5a7fdde3ccf/voidzero-dev/void/issues/565
og:image:altDescription With auth enabled, void dev aliases better-auth/client (and /react, /vue, /svelte, /solid) to absolute file paths. A string alias in Vite also matches subpaths, so better-auth/client/pl...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekarthickeyan-dev
hostnamegithub.com
expected-hostnamegithub.com
None03e5090f0cea887cafa036e3af34d7c668d83b5e9e9e03df72a90efb49b69cdf
turbo-cache-controlno-preview
go-importgithub.com/voidzero-dev/void git https://github.com/voidzero-dev/void.git
octolytics-dimension-user_id149750581
octolytics-dimension-user_loginvoidzero-dev
octolytics-dimension-repository_id1164437080
octolytics-dimension-repository_nwovoidzero-dev/void
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1164437080
octolytics-dimension-repository_network_root_nwovoidzero-dev/void
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release41f00295b9a35dca977890ab83b22788ab211dc8
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/voidzero-dev/void/issues/565#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F565
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F565
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=voidzero-dev%2Fvoid
Reloadhttps://github.com/voidzero-dev/void/issues/565
Reloadhttps://github.com/voidzero-dev/void/issues/565
Reloadhttps://github.com/voidzero-dev/void/issues/565
voidzero-devhttps://github.com/voidzero-dev
voidhttps://github.com/voidzero-dev/void
Codehttps://github.com/voidzero-dev/void
Issues29 (29)https://github.com/voidzero-dev/void/issues
Pull requests9 (9)https://github.com/voidzero-dev/void/pulls
Discussionshttps://github.com/voidzero-dev/void/discussions
Actionshttps://github.com/voidzero-dev/void/actions
Security and qualityhttps://github.com/voidzero-dev/void/security
Insightshttps://github.com/voidzero-dev/void/pulse
https://github.com/voidzero-dev/void
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/565
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/565
#587https://github.com/voidzero-dev/void/pull/587
Dev: better-auth/client/plugins fails to resolve when auth is enabled (the better-auth/client alias matches it as a prefix)https://github.com/voidzero-dev/void/issues/565#top
#587https://github.com/voidzero-dev/void/pull/587
https://github.com/karthickeyan-dev
karthickeyan-devhttps://github.com/karthickeyan-dev
on Oct 23, 2026https://github.com/voidzero-dev/void/issues/565#issue-5994820068
#554https://github.com/voidzero-dev/void/pull/554
Brooooooklynhttps://github.com/Brooooooklyn
completedhttps://github.com/voidzero-dev/void/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#587https://github.com/voidzero-dev/void/pull/587
on Oct 26, 2026https://github.com/voidzero-dev/void/issues/565#event-34223401832
Brooooooklynhttps://github.com/Brooooooklyn
on Oct 26, 2026https://github.com/voidzero-dev/void/issues/565#event-34224959605
fix(auth): match the dev better-auth client aliases exactly (voidzero…https://github.com/yangshun/void/commit/b209501c50d60eb0f35437cf3b1bb29e7e29b13e
voidzero…https://github.com/voidzero-dev/void/pull/587
https://docs.github.com/articles/closing-issues-via-commit-messages
b209501https://github.com/yangshun/void/commit/b209501c50d60eb0f35437cf3b1bb29e7e29b13e
Sign up for freehttps://github.com/signup?return_to=https://github.com/voidzero-dev/void/issues/565
Sign in to commenthttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/565
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.