Browse

What’s in the library

Execution-verified fixes lead: symptom reproduced and fix confirmed in a clean environment. The rest are curated from real resolved issues and checked by a person. Proposed fixes that aren’t verified yet sit below, so you can see what’s in progress.

In the library

60

Curated from real resolved issues and human-reviewed. Execution-verified entries were reproduced end to end in a clean environment.

Execution-verified

"Calling require for react in an environment that doesn't expose the require function" in ESM lib build

Building a component library with `build.lib` and `formats: ['cjs', 'es']`, plus `rollupOptions.external: ['react']`, the ESM output still contains a `require("react/jsx-runtime")` call, which throws `Uncaught Error: Calling \`require\` for "react" in an environment that doesn't expose the \`require\` function` when loaded in the browser.

TypeScriptVitefix reproduced in a clean environment
Execution-verified

Vite 8 fails to tree-shake a boolean constant derived from import.meta.env.MODE via an intermediate or cross-module variable

In Vite 8, code like `const ENABLE_X = MODE === 'foo' || MODE === 'bar'` (where MODE comes from `import.meta.env.MODE` via an intermediate const, especially one imported from another module) is not tree-shaken away in production even when the condition is statically false, bloating bundle size (e.g. 55KB in Vite 7 vs 900KB in early Vite 8). Vite 7/Rollup+terser correctly eliminated the dead branch.

TypeScriptVitefix reproduced in a clean environment
Execution-verified

Vite 8 no longer replaces global define with undefined in CJS output

A CJS library that uses an AMD/UMD-style `typeof define === 'function'` runtime check (e.g. via @paciolan/remote-module-loader) behaves differently after upgrading to Vite 8: code paths that used to be dead-code-eliminated because Rollup's commonjs plugin replaced `define` with `undefined` now execute, since Rolldown (like esbuild) does not perform that substitution.

TypeScriptVitefix reproduced in a clean environment
Execution-verified

Oxc minify reformats template-literal strings, inserting literal newlines instead of removing them

With Vite 8's Oxc-based minifier active (default `build.minify: true`, or any explicit `rolldownOptions.output.minify` object such as `{ mangle: false, compress: true }`), multi-line template-literal strings (e.g. shader source embedded as a template string) come out with literal `\n` sequences preserved/reformatted in the minified output instead of being compacted, producing bloated string output like `"TEST\nTEST\nTEST\nTEST"` where a different minifier would compact it further. This is Oxc's documented behavior (newlines in strings are intentionally not touched by the minifier for safety), but it is a breaking behavior change from the previous terser-based default.

TypeScriptVitefix reproduced in a clean environment
Execution-verified

Vite 8 build emits CSS with non-ASCII codepoints and no @charset, breaking icon fonts (mojibake glyphs)

Icon fonts using PUA (Private Use Area) codepoints in CSS `content:` rules (e.g. video-react, older FontAwesome) render fallback/missing glyphs after upgrading to Vite 8. The built CSS bundle contains raw UTF-8 bytes for those codepoints but no `@charset` rule, no BOM, and the server's `Content-Type: text/css` response has no `charset=utf-8` parameter, so the browser falls back to a non-UTF-8 encoding (e.g. Windows-1252) and mis-decodes the multi-byte codepoint into garbage characters. Caused by the switch from esbuild to lightningcss for CSS minification - lightningcss does not add an ASCII-safe escape or a charset marker the way esbuild's minifier used to.

TypeScriptVitefix reproduced in a clean environment
Execution-verified

resolve.tsconfigPaths silently ignored in Vite 8 build (works without enabling it)

Per Vite docs, `resolve.tsconfigPaths` must be explicitly enabled to resolve tsconfig path aliases, but in Vite 8 the build command resolves them correctly even when the option is left disabled, while dev mode does not - an inconsistency between dev and build. Also affects multi-tsconfig setups (tsconfig.xxx.json) which are not recognized at all.

TypeScriptVitefix reproduced in a clean environment
Curated

Rolldown merges separate entry points, executing an unrelated entry's side effects

With manual code splitting plus rolldown's `entriesAwareMergeThreshold` chunk optimization, two independent entry points that only share a small chunk can get merged so that loading entry `a` also runs entry `b`'s top-level side effects (e.g. two entries each mounting a different Vue/React app end up both mounting when only one was requested). It merges whole entries together, not just the small shared chunk.

TypeScriptVitecurated · human-reviewed
Curated

typeof asset === 'string' check always false in production build with Vite asset placeholders + inlineConst

Production-only bug (does not reproduce in dev): a runtime `typeof` check against an imported asset always evaluates to false, so the wrong code branch runs and later crashes accessing properties like `.sources`/`.img.src`. Seen with SvelteKit + `@sveltejs/enhanced-img` importing an SVG via `?enhanced`. The built chunk contains malformed code such as `if ("string" + new URL(...).href === "string")` instead of a correct string comparison.

TypeScriptVitecurated · human-reviewed
Curated

const require_X = require_X() self-reference crash when bundling CJS deps (e.g. es-toolkit)

Build output contains a self-referential statement like `const require_identity = require_identity();` which throws at runtime. Triggered when bundling a CJS dependency (e.g. es-toolkit) whose own dist files declare local variables using the same `require_<name>` naming convention that rolldown uses internally for its generated require-helpers. When such a helper is referenced across chunks, rolldown keeps the original (non-deconflicted) name, colliding with the source-level local of the same name.

TypeScriptVitecurated · human-reviewed
Curated

Uncaught ReferenceError: init_runtime_dom_esm_bundler is not defined after rolldown 1.0.3 upgrade

Browser throws `Uncaught ReferenceError: init_runtime_dom_esm_bundler is not defined` (or similarly-named `init_*` helper) in a production build, e.g. a Vue 3 app using reka-ui/@vueuse. Regression appears between rolldown 1.0.2 (fine) and rolldown 1.0.3 (broken). Rolldown's tree-shaker correctly deletes an unused `init_*` CJS-interop wrapper function (because the module was eagerly inlined elsewhere), but fails to also remove the call sites that still reference it, leaving a dangling free-variable call. Only occurs when tree-shaking is enabled.

TypeScriptVitecurated · human-reviewed
Curated

TypeError: X is not a function at runtime after upgrading rolldown from 1.0.0 to 1.0.1

Production build throws errors like `TypeError: c is not a function` or `TypeError: ae is not a function` on values imported from bundled modules, after bumping vite/rolldown past 1.0.0. Root cause: a chunk-optimization change (between PR #9270 and #9305) introduced cyclic chunk imports in large module graphs, so a CJS-interop wrapper variable is read while still in a TDZ-like uninitialized state.

TypeScriptVitecurated · human-reviewed
Curated

Wrong tsconfig chosen with TypeScript project references, breaking path resolution

Resolve errors such as `[RESOLVE_ERROR] Error: Could not resolve '.storybook/preview'` or a `paths` mapping silently not applying, even though `resolve.tsconfigPaths: true` (or the tsconfig-paths plugin) is set correctly. Happens when a tsconfig.json has a `references` array but does not set `files: []` or `include: []`, so a source file is ambiguously matched by both the root tsconfig and one of its referenced sub-tsconfigs, and rolldown/tsconfck pick the wrong one (dropping that config's `paths`).

TypeScriptVitecurated · human-reviewed
Curated

"ReferenceError: __rolldown_runtime__ is not defined" with bundledDev: true in a monorepo

With the experimental `bundledDev: true` dev-server option, importing a library from inside a monorepo (where the library's own dependencies, but not the library itself, are listed in `optimizeDeps.include`) throws in the browser console: `Uncaught ReferenceError: __rolldown_runtime__ is not defined`, referencing a line inside a pre-bundled chunk like `debug-BpoEGvGA.js`. App fails to boot.

TypeScriptVitecurated · human-reviewed
Curated

"isValidProp is not a function" using motion/framer-motion with rolldown-vite

Using the `motion` (or `framer-motion`) package, styled components built on `motion.div` throw at runtime because `isValidProp` (loaded from the optional peer dependency `@emotion/is-prop-valid`) isn't a function. The library's optional-dependency loader guards with `if (!isValidProp) return`, but under rolldown's CJS interop, a failed/mocked `require` resolves to a non-function truthy value (e.g. `{}`) instead of `undefined`, so the guard doesn't trigger and the mocked value gets called directly.

TypeScriptVitecurated · human-reviewed
Curated

Dep-optimized WASM package breaks: "CompileError: wasm validation error: failed to match magic number"

A package that does `new URL('file.wasm', import.meta.url)` (common in WASM-using libs) works in production builds but breaks in dev, because Vite's dependency optimizer copies the JS into `node_modules/.vite/deps/` without copying or rewriting the referenced `.wasm` file path. Browser console shows `Uncaught (in promise) CompileError: wasm validation error: at offset 4: failed to match magic number`, and network tab shows a 404 for `node_modules/.vite/deps/<name>.wasm`. Related pattern also breaks `new Worker(new URL(...))` with a MIME-type/404 error.

TypeScriptVitecurated · human-reviewed
Curated

build.target: 'es2019' ignored — optional chaining left in output under rolldown-vite

Setting `build.target: 'es2019'` (or `rolldownOptions.transform.target`) in a Vite config using rolldown-vite has no effect: the output still contains optional-chaining (`?.`) syntax that should have been downleveled for es2019. Classic Vite + Rollup + esbuild correctly strips it for the same config. In `build.lib` multi-format builds (es + cjs), the transform was additionally observed to apply only to the cjs output file, not the es one.

TypeScriptVitecurated · human-reviewed
Curated

vite build --watch hangs on rebuild after editing a file (rolldown-vite >= 7.1.13)

Running `vite build --watch`, the first build completes fine, but editing any source file triggers a rebuild that prints "build started..." and then hangs forever (no error, no completion). Regressed starting at rolldown-vite 7.1.13; more likely on large projects (600+ files) and correlates with lower CPU thread counts.

TypeScriptVitecurated · human-reviewed
Curated

Rust panic "called Option::unwrap() on a None value" building with nullish coalescing (??)

`vite build` on a React project crashes and hangs indefinitely with a native panic from oxc/rolldown: `thread 'tokio-runtime-worker' panicked at .../oxc_ast-0.94.0/src/generated/get_id.rs:36:33: called \`Option::unwrap()\` on a \`None\` value`. Regressed in rolldown-vite v7.1.16 (v7.1.15 was fine). Traced to code using the nullish coalescing operator combined with optional chaining and a `define`-replaced env var, e.g. `import.meta.env.VITE_AUTH_URL ?? window.settings?.authURL`.

TypeScriptVitecurated · human-reviewed
Curated

inlineConst inlines null from `export var foo = null`, breaking SvelteKit SSR with "Cannot set properties of null"

A minimal SvelteKit app built with rolldown-vite returns HTTP 500 on preview, with `TypeError: Cannot set properties of null (setting 'c')` thrown deep in the generated server chunk (`server.js`). Root cause: `build.optimization.inlineConst` inlines the initial `null` value of a `export var foo = null` binding even though the variable is reassigned later, so later code that expects the mutated object instead sees `null`.

TypeScriptVitecurated · human-reviewed
Curated

rolldown constant-folds React.version.startsWith(...) into a string call, crashing the build

With `optimizeDeps.include: ['react']` and a production build, code like `console.log(React.version.startsWith('18'))` gets miscompiled: rolldown inlines `React.version` as the literal string and then folds the whole expression into `"19.1.1"("18")` — calling the string as a function — which throws at runtime. Regressed specifically in rolldown-vite 7.1.8 (7.1.7 was fine); disappears if you use a static object instead of the optimized React import.

TypeScriptVitecurated · human-reviewed
Curated

"X is not a constructor" at runtime after splitting a UI library with advancedChunks

Splitting a large UI library (e.g. element-plus) into its own chunk via `build.rollupOptions.output.advancedChunks` produces a build that fails at runtime with `Uncaught TypeError: Jt is not a constructor` (minified name varies). Build itself completes without errors; only the running app throws.

TypeScriptVitecurated · human-reviewed
Curated

advancedChunks / strictExecutionOrder breaks React Router runtime (undefined route exports)

Enabling `output.advancedChunks` and/or `output.strictExecutionOrder` in a React Router (or other re-export-heavy) app makes the built app crash at runtime with errors like `TypeError: Cannot read properties of undefined (reading 'routes')`. The build succeeds, but a value that should be initialized by a side-effectful module-level call ends up undefined, because a re-exported binding's initializer isn't executed before it's read.

TypeScriptVitecurated · human-reviewed
Curated

rolldown-vite fails to resolve external deps under Yarn PnP

With Yarn Plug'n'Play (PnP) and rolldown-vite, both `vite dev` and `vite build` fail to resolve external packages (e.g. throwing resolve errors for packages that are installed and work fine with plain node_modules or with classic Vite). Reproduced on Windows and Linux under Yarn 4.9.1 PnP; node_modules installs are unaffected.

TypeScriptVitecurated · human-reviewed
Curated

build.rollupOptions.output.manualChunks throws validation error under rolldown-vite

Using `build.rollupOptions.output.manualChunks` (either the object or function form) in a Vite config that uses rolldown-vite fails the build with a config validation error. The same config works fine under classic Vite/Rollup.

TypeScriptVitecurated · human-reviewed
Curated

rolldown renames top-level classes named Error/Promise/Map to Error$1 in IIFE lib builds

Building a library in IIFE format with vite (rolldown-vite/Vite 8), a class declared as `export class Error extends AbstractEvent {...}` gets renamed in the output to `class Error$1 extends AbstractEvent {...}` with `Error$1.NAME = ...` etc. Rollup does not rename it. This breaks code that reads `SomeError.name` and expects the literal string 'Error', since minified output can leave the class as `Error$1`.

TypeScriptVitecurated · human-reviewed
Curated

No replacement documented for removed build.rollupOptions.output.experimentalMinChunkSize in Vite 8

Migrating from Vite 7 to Vite 8, `build.rollupOptions.output.experimentalMinChunkSize` (used to merge small Rollup output chunks) is silently gone with no equivalent mentioned in the v7-to-v8 migration guide, leaving projects with many tiny generated chunks after switching to Rolldown.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8 fails to resolve modules through Yarn PnP global cache folder on a different drive

`Error: [vite]: Rolldown failed to resolve import "react-dom/client" from ".../src/rect/index.jsx"` during `vite build` when using Yarn PnP with a global cache (`enableGlobalCache: true`, the default), especially when the global cache folder lives on a different path/drive than the project (e.g. project on D:\ and cache on D:\.cache, or a system-drive mismatch on Windows). Works fine with Vite 7.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8.0.0 SSR crash on inline style @import: 'specifiers must be a non-empty string'

Server-side rendering with Vite 8.0.0 throws `TypeError: The specifiers must be a non-empty string. Received "?html-proxy&direct&index=0.css"` when an HTML page has an inline `<style>` block containing an `@import` statement (e.g. a Google Fonts import in a raw `<style>` tag). Regression from Vite 7.

TypeScriptVitecurated · human-reviewed
Curated

experimental.bundledDev crashes with 'X is not defined' on libraries with generated helper identifiers

With `experimental.bundledDev: true` enabled in Vite 8, the dev server throws errors like `Uncaught ReferenceError: displayWorkerWarning is not defined`, `style$10 is not defined`, or `formatDistance$95 is not defined` - the referenced helper/identifier is missing from the bundled dev output even though the calling code survives. Affects various libraries (react-pdf, @emotion/react, date-fns locales) that generate re-exported/renamed helper bindings.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8 build breaks namespace imports of CJS packages with side-effect export mutation (e.g. backbone-relational)

`import * as Backbone from 'backbone'; import 'backbone-relational'` builds fine in dev but throws `TypeError: can't access property "extend", ... is undefined` in the Vite 8 production build. Root cause: Rolldown's CJS namespace import snapshots `module.exports` before a later CJS side-effect import (like backbone-relational) mutates the same exports object, so the namespace binding misses the mutation.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8.0.14+ throws 'X is not defined' for cross-chunk top-level side-effect calls

Uncaught ReferenceError: init_reactivity_esm_bundler is not defined (or a similarly named helper/identifier, e.g. Router, checkReady) at runtime after a Vite 8 production build, once the app has enough entry points/chunks for Rolldown's cross-chunk import wiring to kick in. Affects Vue apps and non-Vue libraries alike that have top-level side-effect calls depending on an import from another chunk. Regression appeared between vite@8.0.10 (working) and vite@8.0.14 (broken).

TypeScriptVitecurated · human-reviewed
Curated

output.topLevelVar defaults to true and breaks dead-code elimination in Vite 8

Setting `build.rolldownOptions.output.topLevelVar: false` in Vite 8 has no effect - classes/const declarations still compile to `var`, defeating dead-code elimination and bloating the production bundle vs Vite 7. Docs state the option is disabled by default, but behavior didn't match.

TypeScriptVitecurated · human-reviewed
Curated

import.meta.glob with resolve.alias produces no output files in production build

Files matched via `import.meta.glob()` combined with a `resolve.alias` entry are correctly found in dev mode but are missing from the production build output under Vite 8 (rolldown-vite). Regression introduced by a Rolldown pre-release (rc.13).

TypeScriptVitecurated · human-reviewed
Curated

Side-effect imports execute out of order in Vite 8 production builds

In a Vite 8 production build, modules imported purely for side effects (e.g. `import 'some-polyfill'`) can execute after code that depends on them, even though listed first in source. Causes runtime errors from libraries like react-ace or prism-code-editor that expect their side-effect setup to run before dependent modules load. Only affects `vite build`, not the dev server.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8 production build strips optional chaining from imported bindings

TypeError: Cannot read properties of undefined (reading 'x') after a production build with Vite 8, on code using optional chaining (obj?.prop) against a value imported from another module (e.g. a Svelte $state export). The `?.` is silently removed by the minifier/bundler, turning it into an unguarded property access. Not reproducible in dev mode or Vite 7.1.x.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8 returns 403 Forbidden for cross-origin classic script requests to /src/*.ts

Loading a Vite-served TS/ESM module URL (e.g. /src/plugin.ts) as a classic (non-module) <script src=...> from a different origin returns 403 Forbidden in Vite 8, though it worked in Vite 7.3.x. Commonly hit when a third-party library (e.g. TinyMCE external_plugins) loads a bundler-served file directly as a script rather than as an ES module import.

TypeScriptVitecurated · human-reviewed
Curated

Tree-shaking removes code needed at runtime under Rolldown lazyBarrel with complex module graphs

Uncaught ReferenceError: __exportAll is not defined (or similar missing export helper) in production builds with Vite 8.1.0+ / Rolldown >=1.1.0, when the project has a complex module graph with re-exports/barrel files. Caused by Rolldown's experimental lazyBarrel tree-shaking optimization mishandling barrel-file exports.

TypeScriptVitecurated · human-reviewed
Curated

Dependency pre-bundling causes wrong execution order for CJS side-effect modules

In Vite 8 dev mode, pre-bundled (optimizeDeps) CommonJS dependencies with internal side effects (e.g. echarts) execute in the wrong order compared to Vite 5/Rollup, causing broken behavior at runtime. Works fine in production build; only dev server pre-bundling is affected.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8.0.13 dev regression: React.lazy + resolve.alias breaks with experimental.bundledDev

With `experimental.bundledDev: true` and a `resolve.alias` configured, dynamically imported (React.lazy) components fail to load correctly in dev mode - a regression that appeared specifically in Vite 8.0.13. Maintainer traced it to `resolve.alias` conflicting with the bundled-dev lazy-compilation implementation: the alias resolution and the lazy-chunk-loading mechanism stepped on each other.

TypeScriptVitecurated · human-reviewed
Curated

@vitejs/plugin-legacy: legacy chunks never load on Safari 15.x and below

With `@vitejs/plugin-legacy`, browsers on Safari 15.x (and earlier) fail to load the legacy fallback chunks even though they should be served modern-browser-detection determines the browser as modern when it isn't, or the legacy path silently never executes. Root cause: a genuine Safari 15.x engine bug (related to WebKit commit 92ba524) where an error thrown inside a module is only triggered once; the plugin's browser-detection module relies on repeatedly triggering the same error pattern, which breaks on affected Safari versions.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8: dynamic import() of a .cjs file inside application source code stops working

Application source code that does `await import('./something.cjs')` (dynamic import of a CommonJS file, e.g. to run Node.js-target code) worked in Vite 7 but fails in Vite 8. Root cause: it only happened to work before because `@rollup/plugin-commonjs` hardcoded handling of `.cjs` files regardless of Vite's configured filter; Rolldown's automatic CJS handling now incorrectly treats the dynamic import as a static import instead of leaving it alone, and Vite never officially supported dynamically importing raw CJS from source in the first place (dev mode never worked with this pattern either).

TypeScriptVitecurated · human-reviewed
Curated

"Failed to resolve dependency" for a package listed in optimizeDeps.include, under Yarn PnP

Under Yarn PnP, a dependency explicitly listed in `optimizeDeps.include` still fails to resolve during the dependency-scan/optimize step, throwing a resolution error even though the package is present and declared. Traced by a Vite maintainer to Rolldown's `oxcResolvePlugin`, which the dependency optimizer routes package resolution through and which didn't correctly handle PnP resolution in this path.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8 Oxc minifier corrupts Monaco editor worker code (block-scoped function name collides with outer var)

After switching to Vite 8's default Oxc-based minifier, bundled code using Monaco Editor's web workers throws runtime errors that don't occur with esbuild minification. Root cause: a known Oxc mangler bug where the minifier doesn't account for Annex B block-scoped function declaration semantics in sloppy mode, letting it reuse the same mangled name for a block-scoped function and an outer `var` binding of the same original name, which changes runtime behavior.

TypeScriptVitecurated · human-reviewed
Curated

import.meta.glob no longer emits unused imported assets in Vite 8 (breaks Laravel plugin asset globbing)

Code like `import.meta.glob(['../images/**'])` (without `eager: true`, value not otherwise used) stops causing those asset files to be emitted in the build output under Vite 8/Rolldown, whereas Vite 7/Rollup emitted them. This broke laravel-vite-plugin's approach of using `import.meta.glob` purely to register a directory of assets as build inputs. Root cause: Rollup does not eliminate `/* #__PURE__ */`-marked calls before scanning a file's imports, so unused glob imports still got scanned and their referenced files emitted; Rolldown removes the pure call first, so the imports are never scanned and the assets are never emitted.

TypeScriptVitecurated · human-reviewed
Curated

resolve.tsconfigPaths aliases fail to resolve when importer is a virtual module (Vue SFC, TanStack Router split components)

With `resolve: { tsconfigPaths: true }`, path-aliased imports (e.g. `@/components/foo`) fail to resolve when the *importing* file is a virtual module id with a query string, such as a Vue SFC (`App.vue?id=0`) or a TanStack Router code-split component (`index.tsx?tsr-split=component`). Errors look like `Error: [vite]: Rolldown failed to resolve import "@/components/footer" from ".../_main.tsx?tsr-split=component"` during build, or on Windows specifically `Failed to run dependency scan... @/util/foo (imported by .../App.vue?id=0)` during dev.

TypeScriptVitecurated · human-reviewed
Curated

"vite tried to access esbuild (a peer dependency) but it isn't provided" in [plugin vite:css-post]

Production build fails under Yarn Berry/PnP (or any package manager enforcing strict peer-dependency resolution) with: `[plugin vite:css-post] Error: vite tried to access esbuild (a peer dependency) but it isn't provided by its ancestors`. Happens because in Vite 8, `esbuild` became an optional peer dependency (Rolldown replaced it, and `build.cssMinify` now defaults to `lightningcss`), but a plugin in the chain (e.g. Vike) explicitly overrides `build.cssMinify` back to `'esbuild'` without esbuild being an installed dependency.

TypeScriptVitecurated · human-reviewed
Curated

"require_dist is not a function" / mermaid production build crash from @braintree/sanitize-url

Production build (not dev) throws a TypeError like `require_dist is not a function` or `require_defineProperty is not a function` at runtime when a dependency chain pulls in `@braintree/sanitize-url@7.1.1` (e.g. via mermaid). Root cause: that package version assigns `exports.sanitizeUrl = sanitizeUrl` before the `function sanitizeUrl(url) {...}` declaration, relying on plain JS function hoisting - valid in Node's CJS loader but mishandled by Rolldown's CJS-to-ESM conversion order.

TypeScriptVitecurated · human-reviewed
Curated

Rolldown server build hangs indefinitely (deadlock) on large SSR apps with many SFC <style> blocks

`vite build` for the SSR/server environment never completes; the process sits at ~850MB RSS with 0% CPU. Sampling the hung process shows all worker-pool threads (tokio-runtime-workers and rolldown-workers) parked in `pthread_cond_wait`, indicating a genuine deadlock rather than slowness - a reentrancy deadlock between Rolldown's worker pool and the JS main thread during a CSS-heavy transform pass. `ROLLDOWN_MAX_BLOCKING_THREADS` has no effect at any value because the pool is idle, not saturated.

TypeScriptVitecurated · human-reviewed
Curated

@vitejs/plugin-legacy build fails after esbuild upgrade: "Transforming destructuring ... is not supported yet"

After esbuild bumped to 0.27.7+ inside Vite 7.3.2's dependency tree, `@vitejs/plugin-legacy` builds fail with errors like: `[vite:esbuild-transpile] Transform failed with 25 errors: ... Transforming destructuring to the configured target environment ("chrome64", ... ) is not supported yet`, even with stock legacy() config such as `legacy({ targets: ['defaults', 'not IE 11'] })`.

TypeScriptVitecurated · human-reviewed
Curated

import.meta.glob fails in Vite 8 build for directories with parentheses, e.g. "./(dir)/*.js"

`import.meta.glob("./(dir)/*.js", { eager: true })` (a directory literally named with parentheses) works in dev but fails to match any files during `vite build`. The build-mode glob implementation is a native Rust plugin that only supports basic glob syntax (`?`, `*`, `**`, `[]`, `{}`) and does not treat backslash-escaped parens the same way dev mode does.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8 dev server incorrectly unwraps CJS default export, causing "Minified React error #130" or undefined component

A CJS dependency using the `__esModule` + `exports.default` pattern gets its default export incorrectly unwrapped to the inner value in dev (returning the raw object instead of `{ default: ... }`), while build/preview does the opposite (unwraps when it shouldn't), producing an inconsistency between dev and prod. Symptom includes React error #130 (element type is invalid) or `undefined` where a default-exported component/value was expected.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8.1.0 dev server: "Uncaught (in promise) SyntaxError: Unexpected token '('" from a class method named `import`

Blank page in dev only (production build unaffected) after upgrading to Vite 8.1.0, caused by any dependency that has a class method literally named `import(...)` (e.g. TensorFlow.js's HashTable.import, @polymer/polymer's DomModule.import, pocketbase JS SDK's CollectionService.import). Vite's import-analysis mistakes the method call for a dynamic import and rewrites it into invalid JS: `async import(__vite__injectQuery(keys, 'import'), values) { ... }`.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8.0.10 production build: "Uncaught TypeError: a is not a function" / "Class extends value undefined" on lazy-loaded React chunks

Errors like `Uncaught TypeError: a is not a function` (React.lazy + jsx-runtime CJS interop) or `Class extends value undefined is not a constructor or null` appear only in production builds on Vite 8.0.10, never in dev. Traced to a circular import Rolldown introduces between chunks, e.g. `icon-A.js -> index.js -> icon-B.js -> icon-A.js`, so a shared CJS wrapper (`__commonJSMin`) isn't callable yet when a lazy chunk executes.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8 dev server crash: "init_emotion_react_browser_development_esm is not defined" / similar init_* errors with MUI or React

Dev server (or build) throws errors referencing generated helper names like `init_emotion_react_browser_development_esm` when using MUI v5/v9 or other packages with emotion/React peer deps, starting around Vite 8.0.13-8.0.16. Symptom is a runtime crash on load, not a build-time error.

TypeScriptVitecurated · human-reviewed
Curated

Vite 8/Rolldown: module-level side effects run in wrong order after code splitting

A side-effect import (e.g. reflect-metadata, a polyfill, or a class registered via a global side effect like Lit's hydrate-support) that must run before dependent code executes now runs too late once the build is chunked, e.g. 'Uncaught TypeError: Class extends value undefined is not a constructor or null' or a polyfill never applying. Works fine in dev, breaks only in the production build. Happens whenever Rolldown's automatic or manual code splitting separates a side-effect-only module from its dependents.

TypeScriptVitecurated · human-reviewed
Curated

TypeError: Object of type X is not JSON serializable

`json.dumps(obj)` fails because the object (datetime, Decimal, set, numpy type, dataclass, etc.) isn't a built-in JSON type.

Pythoncurated · human-reviewed
Curated

ImportError: attempted relative import with no known parent package

Running a file that uses `from . import x` directly (e.g. `python pkg/module.py`) fails with 'attempted relative import with no known parent package'.

Pythoncurated · human-reviewed
Curated

pip: 'error: externally-managed-environment'

On newer Linux/macOS Python, `pip install x` refuses with 'externally-managed-environment' (PEP 668).

PythonLinuxcurated · human-reviewed
Curated

RuntimeWarning: coroutine 'x' was never awaited

Calling an `async def` function without awaiting it does nothing and warns 'coroutine was never awaited'.

Pythoncurated · human-reviewed
Curated

Function's default list/dict argument 'remembers' values between calls

A function defined with `def f(items=[])` accumulates data across calls — the default object is shared.

Pythoncurated · human-reviewed