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

"Resolve" plugin api return path when browser {"module":false} #2123

Open
spencerHT opened this issue Mar 24, 2022 · 1 comment
Open

"Resolve" plugin api return path when browser {"module":false} #2123

spencerHT opened this issue Mar 24, 2022 · 1 comment
Labels

Comments

@spencerHT
Copy link

Case

About package object-inspect which has browser config in package.json.

{
  "browser": {
    "./util.inspect.js": false
  },
}

When use bundler will correctly return empty in bundler, but in plugin resolve api that return path liked node_modules/.pnpm/object-inspect@1.12.0/node_modules/object-inspect/util.inspect.

In this case, I use the resolve result to load file but failed.
From developer‘s point of view, need to solve browser module false case by self, or just ignore load fails.

What is expected

In enhanced-resolve, this case with object-inspect return path as false, that easily to decide and understand.
May esbuild do the same return?

Other Information

esbuild version: 0.14.23
Relative PR: #1881

@evanw
Copy link
Owner

evanw commented Apr 4, 2023

This is related to #2970.

@evanw evanw added the plugins label Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants