bun icon indicating copy to clipboard operation
bun copied to clipboard

[plugin] get import attributes/assertions in plugin

Open codehz opened this issue 2 years ago • 1 comments

What is the problem this feature would solve?

I think the import attributes is supposed to be used in bundler/plugin system, especially about the "type" (but other custom attributes is also useful)

What is the feature you are proposing to solve the problem?

in PluginBuilder, add type as filter in onResolve/onLoad (just like the namespace) also in callback, get the whole import attributes/assertions object

What alternatives have you considered?

use macro

codehz avatar Nov 24 '23 02:11 codehz

Just bumping this one! This will make it easy to create plugins that respect attributes from import statements.

bradleat avatar Dec 12 '25 02:12 bradleat