You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently ran into a question where someone was struggling to import a file like import whatever from 'some-package' in their ffi code. Users coming from other js bundlers will expect imports like this to work automatically, and folks using dev-tools for bundling but still using npm to access the js ecosystem will run into this problem every time.
If we were using the npm version of esbuild we could use the node resolution plugin, but because we're using the standalone version we are going to have to work on the js ffi files directly.
Node calls these kinds of imports that are not relative or absolute, "bare" imports. And the rules for how they are resolved are outlined in https://nodejs.org/api/packages.html#package-entry-points. It would be great if we would rewrite these bare imports into ones that resolved to node_modules correctly before running esbuild.
The text was updated successfully, but these errors were encountered:
We recently ran into a question where someone was struggling to import a file like
import whatever from 'some-package'
in their ffi code. Users coming from other js bundlers will expect imports like this to work automatically, and folks using dev-tools for bundling but still using npm to access the js ecosystem will run into this problem every time.If we were using the npm version of esbuild we could use the node resolution plugin, but because we're using the standalone version we are going to have to work on the js ffi files directly.
Node calls these kinds of imports that are not relative or absolute, "bare" imports. And the rules for how they are resolved are outlined in https://nodejs.org/api/packages.html#package-entry-points. It would be great if we would rewrite these bare imports into ones that resolved to node_modules correctly before running esbuild.
The text was updated successfully, but these errors were encountered: