-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: esbuild keeps saying import will be undefined #629
Comments
It's a warning, not an error, so the build will still succeed. It shouldn't stop you from using the resulting bundle.
It looks like this is a problem with the It's not a problem with esbuild because other bundlers that follow the specification for the This can either be addressed by fixing the package, or by telling esbuild to ignore the |
So to fix this problem I need to specify an ESM file in the browser field instead of an IIFE. Edit: The browser field was the problem, thanks. If possible please add links to the documentation on how the package.json fields work to the esbuild documentation as others might run into the same issue in the future. It seems I misunderstood how the browser field worked during a change tp the package.json I ended up breaking a lot of things. |
This is following evanw/esbuild#629.
Esbuild keeps saying "the bundle will always be undefined", and it logs this error for all import's,
Esbuild version: ^0.8.26
Config:
BTW, I am using
pnpm workspaces
, but that shouldn't affect the build, sincepnpm
syslinks all the workspaces and modules.The text was updated successfully, but these errors were encountered: