vitejs/vite · error · Error
Not implemented
Error message
Not implemented
What it means
Thrown inside the esbuild-to-rolldown plugin converter (`adapterPlugin`). The `pluginBuild.initialOptions` object is a Proxy exposing only `platform` and `plugins`; reading any other property that an esbuild plugin expects on `build.initialOptions` (e.g. `bundle`, `target`, `format`, `entryPoints`) trips the proxy's get trap. The converter only supports a subset of the esbuild plugin API.
Solutions
- Stop reading unsupported `initialOptions` keys in the plugin's setup; pass needed values through plugin config instead.
- Replace the esbuild plugin with a native rolldown plugin using `resolveId`/`load` hooks.
- Read only `initialOptions.platform` or `initialOptions.plugins`, which the proxy supports.
- If you only need options reflection, capture them outside the plugin and close over them.
- File/track an issue: extend the adapter target object with the missing key if broadly needed.
Example fix
// before
setup(build) {
if (build.initialOptions.target?.includes('esnext')) { /* ... */ }
}
// after
setup(build) {
// pass target via plugin options instead of reading initialOptions
if (opts.target?.includes('esnext')) { /* ... */ }
} Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_INITIAL_OPTIONS = new Set(['platform', 'plugins'])
function assertEsbuildPluginSafe(plugin: { setup: (b: any) => void }) {
const probe: any = new Proxy({ platform: 'node', plugins: [] }, {
get(t, p) {
if (SUPPORTED_INITIAL_OPTIONS.has(p as string)) return t[p]
throw new Error(`plugin reads unsupported initialOptions.${String(p)}`)
},
})
plugin.setup({ initialOptions: probe, onStart() {}, onEnd() {}, onResolve() {}, onLoad() {}, onDispose() {}, resolve() {} })
}
// assertEsbuildPluginSafe(myEsbuildPlugin) before registering it Type guard
function usesOnlySupportedInitialOptions(plugin: { setup: (b: any) => void }): boolean {
let safe = true
const probe = new Proxy({ platform: 'node', plugins: [] }, { get(t, p) { if (p in t) return (t as any)[p]; safe = false; return undefined } })
try { plugin.setup({ initialOptions: probe } as any) } catch { /* ignore setup errors */ }
return safe
} Try / catch
try {
await build()
} catch (e) {
if (e instanceof Error && e.message === 'Not implemented') {
console.error('An esbuild plugin reads an unsupported initialOptions key; migrate it to rolldown.')
}
throw e
} Prevention
- Prefer rolldown-native plugins over adapted esbuild plugins in Vite config.
- Static-audit third-party esbuild plugins for build.initialOptions access before registering them.
- Pass configuration values through plugin options rather than reading initialOptions.
When it happens
Trigger: An esbuild-compatible plugin registered in `optimizeDeps.rolldownOptions.plugins` (or a Vite plugin adapted via this converter) reads `build.initialOptions.<unsupportedKey>` inside its `setup(build)`. At pluginConverter.ts:72 the proxy throws because the key is not in the target.
Common situations: Porting an esbuild plugin to Vite's rolldown-powered optimizer. Plugin introspects `initialOptions.entryPoints` or `target` to branch logic. Vite version upgrade switched the dep optimizer backend to rolldown and the adapter is incomplete for that plugin.
Related errors
- not implemented
- Not implemented property
- Could not resolve " " imported by " ". Is it installed?
- failed to resolve rolldownOptions.input value
- invalid rolldownOptions.input value.
AI-assisted analysis of vitejs/vite@b4d66fee14 (2026-08-11).
Data as JSON: /api/errors/3671e7d832867259.
Report an issue: GitHub.
Appendix: source
Thrown at packages/vite/src/node/optimizer/pluginConverter.ts:72
{
platform,
plugins:
plugins?.flatMap((p) =>
p && 'name' in p
? [
{
name: p.name,
// eslint-disable-next-line @typescript-eslint/no-empty-function
setup() {},
},
]
: [],
) ?? [],
},
{
get(target, p, _receiver) {
if (p in target) return (target as any)[p]
throw new Error('Not implemented')
},
},
) as esbuild.BuildOptions,
resolve() {
throw new Error('Not implemented')
},
onStart(callback) {
onStartCallbacks.push(callback)
},
onEnd(callback) {
onEndCallbacks.push(callback)
},
onResolve(options, callback) {
onResolveCallbacks.push([options, callback])
},
onLoad(options, callback) {
onLoadCallbacks.push([options, callback])
},View on GitHub (pinned to b4d66fee14)