Skip to content
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

fix: esm imports with node: prefix on esbuild #802

Merged
merged 4 commits into from Nov 11, 2021

Conversation

netlify-team-account-1
Copy link
Contributor

- Summary

fixes a bundling error that occurs when esbuild bundles a node:-namespaced esm import.

cc nuxt/nuxt#12764

- Test plan

- A picture of a cute animal (not mandatory but encouraged)

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Nov 11, 2021
Copy link
Member

@eduardoboucas eduardoboucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Added just a tiny comment.

src/runtimes/node/bundlers/esbuild/bundler.ts Outdated Show resolved Hide resolved
Copy link
Member

@eduardoboucas eduardoboucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎸

@kodiakhq kodiakhq bot merged commit 199f6ed into main Nov 11, 2021
@kodiakhq kodiakhq bot deleted the esbuild-node-prefixed-imports branch November 11, 2021 11:09
@github-actions
Copy link
Contributor

⏱ Benchmark results

largeDepsEsbuild: 7.7s

^   7.7s  
│   ┌──┐  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
└───┴──┴──>
     T    
Legend
  • T (current commit): 7.7s

largeDepsNft: 50.2s

^  50.2s  
│   ┌──┐  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
└───┴──┴──>
     T    
Legend
  • T (current commit): 50.2s

largeDepsZisi: 1m 4.5s

^ 1m 4.5s 
│   ┌──┐  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
│   |▒▒|  
└───┴──┴──>
     T    
Legend
  • T (current commit): 1m 4.5s

@hrishikesh-k
Copy link

hrishikesh-k commented Nov 11, 2021

Hey team, is this supposed to be working fine in Netlify CLI?

I was testing a repo and got the exact same error in CLI, except the user is using Vite and not Nuxt.js.

EDIT: Their netlify.toml is using esbuild, so it doesn't seem like a zip-it-ship-it problem. I'll take this to the CLI team.

@netlify-team-account-1
Copy link
Contributor Author

It's indeed a ZISI problem, which uses esbuild internally. It's expected that this error occurs in the CLI until we ship a new version of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants