-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cannot implement import attribute with { type: "external" }
#3646
Comments
Keep in mind that build.onResolve({filter: /.*/}, async (args) => { is a pretty punishing operation. What you ask from esbuild here is call a javascript method on every single import statement, which blocks esbuild from grinding through your project as fast as possible, as it can only pick the next file when your resolver answered. Even if this took only a millisecond to answer, on 1000 import statements you added 1 second of overhead. |
It might turn out to be a really handy option. As for possible performance issues I saw someone had suggested to introduce extra filtering property, smth. like { filter: /.*/, withType: "external" }. |
I'm trying to implement this:
In other words:
That would work but the issue is that
args.with
is missing atonResolve()
. It seems to be provided only toonLoad()
.Is there a way to implement such import attribute?
The text was updated successfully, but these errors were encountered: