#11061·rolldown

Oxc mangle breaks Svelte SSR snippet/__name helpers (TypeError: iN is not a function)

Author: fringe4lifeCreated Oct 1, 2026Updated Oct 1, 2026
Labelsbug: upstreamneeds-reproduction

Summary

With Vite 8 / Rolldown production minify (Oxc), enabling name mangling on a SvelteKit SSR bundle can throw at runtime, e.g. TypeError: i9 is not a function. Disabling only mangling (output.minify.mangle: false) while keeping compress (dropConsole, etc.) makes SSR routes work again.

Observed on SvelteKit pages that use snippets / Svelte's __name keep-names helpers in the compiled SSR output.

Versions (app that hit this)

Workaround

typescript
// vite.config.ts
export default defineConfig({
  build: {
    rolldownOptions: {
      output: {
        minify: {
          compress: { dropConsole: true },
          mangle: false,
        },
      },
    },
  },
});

Evidence

Notes

  • Compress-only minify is fine; mangling is the trigger.
  • Related closed mangler shadowing bugs: #7848, #7843 (fixed earlier) — this still reproduces on current Vite 8.3 / Rolldown 1.2 for Svelte SSR output, so may be a distinct pattern in Svelte-generated code.
  • Related Vite 8 + Svelte meta tracker: https://github.com/sveltejs/vite-plugin-svelte/issues/1143

Ask

Happy to help reduce a minimal repro (SvelteKit app with a snippet-heavy page + default Rolldown minify). Filing here first because Vite wires Oxc minify through Rolldown output.minify.