Title: Plugin loader: derive id from parent directory when module basename is generic (plugin.js/index.js) · Issue #596 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Plugin loader: derive id from parent directory when module basename is generic (plugin.js/index.js) · Issue #596 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Plugin loader: derive id from parent directory when module basename is generic (plugin.js/index.js) · Issue #596 · JavaScriptSolidServer/JavaScriptSolidServer
Description: What happens The loader derives a plugin's id from the module basename. The natural out-of-tree convention is
Open Graph Description: What happens The loader derives a plugin's id from the module basename. The natural out-of-tree convention is
X Description: What happens The loader derives a plugin's id from the module basename. The natural out-of-tree convention is <name>/plugin.js, so every plugin derives the id plugin, and the (correct) du...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/596
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Plugin loader: derive id from parent directory when module basename is generic (plugin.js/index.js)","articleBody":"## What happens\n\nThe loader derives a plugin's id from the module basename. The natural out-of-tree convention is `\u003cname>/plugin.js`, so **every** plugin derives the id `plugin`, and the (correct) duplicate-id guard refuses to boot until each entry carries an explicit `id`.\n\n## Repro\n\n```js\ncreateServer({ plugins: [\n { module: 'relay/plugin.js', prefix: '/relay' },\n { module: 'webrtc/plugin.js', prefix: '/webrtc' },\n] })\n// → duplicate plugin id 'plugin'\n```\n\n## Evidence\n\nAll 32 plugins in https://github.com/JavaScriptSolidServer/plugins hit this; `compose.test.js` and `serve.js` there carry 32 hand-written `id:` fields solely to dodge it. See REPORT.md (\"Five loader/core bugs\", #1).\n\n## Suggested fix\n\nWhen the basename is generic (`plugin`, `index`), derive the id from the parent directory: `relay/plugin.js` → `relay`. Backward-compatible (explicit `id` still wins); removes the most common plugin-author footgun.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-07-11T07:46:26Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/596"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3e94b496-5585-d755-3920-47b8d6a77849 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B8C8:20D128:533F52:6E515B:6B0387BE |
| html-safe-nonce | c97585a1419e6e819577be02f2573505c7af6128168e329b884dc2ec5559f1be |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEM4OjIwRDEyODo1MzNGNTI6NkU1MTVCOjZCMDM4N0JFIiwidmlzaXRvcl9pZCI6IjE4NDk0NjE3MjY0NDAwMTcyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b6af4ebce480a40336cc0209cfe7fab995eb188771139b737dfbec3a7109b315 |
| hovercard-subject-tag | issue:4861220449 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/596/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3acf8650d1088bed7eb8e87c366b815c77232e1b3e9a68743497fc34ef125835/JavaScriptSolidServer/JavaScriptSolidServer/issues/596 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3acf8650d1088bed7eb8e87c366b815c77232e1b3e9a68743497fc34ef125835/JavaScriptSolidServer/JavaScriptSolidServer/issues/596 |
| og:image:alt | What happens The loader derives a plugin's id from the module basename. The natural out-of-tree convention is |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width