---
title: Fix Astro Dev Toolbar 'Not Implemented' Crash
description: Fix Astro's dev toolbar crashing with a 'Not implemented' error under Vite 8's Rolldown esbuild-compat shim. Real workaround included.
date: 2026-08-05T00:00:00.000Z
category: guides-fixes
tags: astro, vite, rolldown, bug-fix
---

## Quick Answer

Astro's built-in dev toolbar can crash with `Not implemented` thrown from `PluginContextImpl.generateBundle`, because its `onEnd` callback reads `result.metafile`, a field Vite 8's Rolldown esbuild-compatibility shim doesn't implement. Strip `optimizeDeps.esbuildOptions.plugins` in a `configResolved` hook in your Astro config to stop the crash without disabling the toolbar.

## Why the dev toolbar crashes under Rolldown

Vite 8 switched its dependency optimizer from esbuild to Rolldown, and ships an esbuild-plugin compatibility shim so existing `optimizeDeps.esbuildOptions.plugins` configs keep working without every plugin author rewriting for Rolldown's own plugin API.

Astro's own built-in `astro:dev-toolbar` integration registers exactly this kind of plugin: an esbuild plugin with an `onEnd` callback that reads `result.metafile`, a field esbuild's real dependency-scan output includes. Rolldown doesn't produce an esbuild-style metafile, and its compatibility shim doesn't implement that field. Calling the callback throws instead of quietly returning nothing:

```
Not implemented
  at PluginContextImpl.generateBundle (vite/dist/node/chunks/node.js:33847)
```

The crash was reported directly: "[vite rolldown compatibility issue](https://github.com/withastro/astro/issues/16636)," opened 2026-05-07 against Astro 6.2.2 and Vite 8.0.11. It was closed as not planned; a workaround shipped for one specific project's own config, not a fix to Astro's dev-toolbar plugin itself.

<Callout
  type="info"
  title="Verified: current Astro 7.1.3 no longer triggers this specific path"
>
  Checked directly against this site's own installed
  `node_modules/astro/dist/toolbar/vite-plugin-dev-toolbar.js` (`astro@7.1.3`):
  its `config()` hook only sets `optimizeDeps.include` today, not
  `optimizeDeps.esbuildOptions.plugins` at all. The exact crash described above
  doesn't appear to trigger from Astro's own dev-toolbar integration on current
  7.x releases. It's still real and worth knowing the fix for if you're on an
  older Astro 6.x project, or if a *different* plugin in your app sets an
  esbuild `onEnd` callback that reads `result.metafile`, the fix below is
  defensive against that exact pattern regardless of which plugin triggers it.
</Callout>

## Fix it: strip the incompatible esbuild plugin

### Before: default Astro config

```js title="astro.config.mjs"
export default defineConfig({
  // dev toolbar enabled by default (the Astro 7 default) —
  // its esbuild plugin crashes under Rolldown (BROKEN)
});
```

### After: add a plugin that clears the broken hook

```js title="astro.config.mjs"
export default defineConfig({
  vite: {
    plugins: [
      {
        name: "fix-rolldown-esbuild-compat",
        configResolved(config) {
          // FIXED: the dev toolbar's esbuild onEnd callback reads
          // result.metafile, which Rolldown's compat shim doesn't
          // implement — clearing the plugin list avoids the crash
          if (config.optimizeDeps?.esbuildOptions?.plugins) {
            config.optimizeDeps.esbuildOptions.plugins = [];
          }
        },
      },
    ],
  },
});
```

This runs at config-resolution time, before the dev server starts optimizing dependencies, so it removes the broken callback before anything can invoke it. The dev toolbar itself keeps working; only the specific esbuild `onEnd` hook that Rolldown can't satisfy gets cleared.

<Callout type="warning" title="This edits a live config object">
  `configResolved` receives Vite's final, merged config; mutating
  `optimizeDeps.esbuildOptions.plugins` here only removes the array Astro's
  dev-toolbar integration already pushed onto, not anything you configured
  yourself under a different plugin name. If you also rely on other
  `optimizeDeps.esbuildOptions.plugins` entries, filter this list instead of
  clearing it outright.
</Callout>

## Confirmed version range

Reported against Astro 6.2.2 and Vite 8.0.11. Checked directly against this site's own `astro@7.1.3` install: its dev-toolbar plugin's `config()` hook has already moved away from setting `optimizeDeps.esbuildOptions.plugins`, so the specific crash reported in the original issue doesn't reproduce from Astro's own integration on current 7.x. If you're on Astro 6.x, or hitting the identical `Not implemented` error from a different plugin, the fix above still applies: the trigger is any esbuild plugin with an `onEnd` callback reading `result.metafile`, not something specific to the dev toolbar itself. Browse more posts like this in the [Guides & Fixes](/guides-fixes) archive.
