You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: file:// plugin dedup silently drops plugins when multiple share the same filename (e.g. index.js) #14304
When two or more plugins are loaded via file:// paths and their JS filenames are identical (e.g. both named index.js), deduplicatePlugins() silently drops all but one. No error or warning is logged.
Expected: Both plugins load. Actual: Only one loads (the later entry wins). The other is silently discarded.
Root Cause
getPluginName() extracts just the bare filename (without extension) for file:// URLs. Both paths resolve to canonical name "index". deduplicatePlugins() then treats them as the same plugin and keeps only the last one (reverse-order processing, last = highest priority).
Impact
This is a silent failure — no error, no warning, no log entry. The dropped plugin simply doesn't exist at runtime. This is especially likely during local plugin development where dist/index.js is the standard build output for most bundlers (bun, esbuild, rollup, etc.).
Suggested Fix
For file:// URLs, derive the canonical name from a more unique portion of the path rather than just the bare filename. Options:
Use the parent directory name + filename (e.g. plugin-a/index → "plugin-a")
Use the full path as the canonical name for file:// entries
At minimum, log a warning when dedup discards a file:// plugin
Workaround
Ensure each file:// plugin has a unique JS filename:
This is addressed by #15598 which adds node_modules-aware path parsing to getPluginName(). CI is green.
The root cause is that import.meta.resolve resolves npm plugins to file://…/node_modules/<pkg>/dist/index.js, and then getPluginName() extracts only the filename "index", causing false collisions with any project plugin that also has an index.ts entry point.
Activity
github-actions commentedon Feb 19, 2026
This issue might be a duplicate of existing issues. Please check:
Please review these issues before continuing, and consider adding your findings there if they match your case.
cyberprophet commentedon Mar 4, 2026
This is addressed by #15598 which adds node_modules-aware path parsing to
getPluginName(). CI is green.The root cause is that
import.meta.resolveresolves npm plugins tofile://…/node_modules/<pkg>/dist/index.js, and thengetPluginName()extracts only the filename"index", causing false collisions with any project plugin that also has anindex.tsentry point.Related issues: #8759, #10115, #11159, #12285, #14304, #15591
fix(config): use package.json name for file:// plugin identity
github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.