espub icon indicating copy to clipboard operation
espub copied to clipboard

Plugins

Open cometkim opened this issue 4 years ago • 1 comments

Configurability by additional plugin support could be a good escape hatch for edges like #12.

Fortunately, nanobundle is a plain ESM, so it's very easy to achieve that via dynamic import .

Provide a way to configure additional plugins in addition to the currently built-in import maps and embedding deps plugins. Mostly it's just an esbuild plugin, but I need to provide additional dependencies for initialization.

cometkim avatar Feb 07 '22 22:02 cometkim

Note:

Even if nanobundle get a plugin interface, it will not be compatible with most external plugins since nanobundle already fix module resolutions

https://github.com/cometkim/nanobundle/blob/3d07b82/src/plugins/esbuildNanobundlePlugin.ts

See https://github.com/evanw/esbuild/issues/2216 to track upstream issue

cometkim avatar May 10 '23 03:05 cometkim