-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Description
🐛 bug report
When importing anything from zod/v4
, Parcel fails to emit a valid production bundle, with a runtime error like:
Uncaught ReferenceError: $99ddb65c04cf77f8$import$6c56dec3ecdf94f9 is not defined
at index.js:4:16
This does not occur with the development server.
It seems to be related to scope hoisting, as --no-scope-hoist
resolves the issue. Maybe this is similar to issues like #8792?
🎛 Configuration (.babelrc, package.json, cli command)
Default latest parcel configuration. See minimal repro: https://github.com/loganzartman/parcel-bug-zod-v4
🤔 Expected Behavior
There should be no runtime error when importing from zod/v4
😯 Current Behavior
Uncaught ReferenceError: $99ddb65c04cf77f8$import$6c56dec3ecdf94f9 is not defined
at index.js:4:16
💁 Possible Solution
build with --no-scope-hoist
🔦 Context
Prevents using zod/v4
💻 Code Sample
https://github.com/loganzartman/parcel-bug-zod-v4
import {z} from 'zod/v4';
console.log(z.object({}));
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 2.15.2 |
Node | 22.11.0 |
npm/Yarn | [email protected] |
Operating System | MacOS, Linux |
thobas-dnvgl, bmelonis-tw and kamilchm
Metadata
Metadata
Assignees
Labels
No labels