espub icon indicating copy to clipboard operation
espub copied to clipboard

Support build without bundling

Open cometkim opened this issue 2 years ago • 2 comments

Note: this will be a major milestone for nanobundle v2

Bundling is for the application, bundling in NPM libraries is of no value (since we don't support UMD bundle)

Another problem with bundling is that it is incompatible with some Node.js semantics, such as subpath pattern exports. This is a blocker for some issues (#45, #48)

But building a library without bundling is not trivial today. Bundlers like esbuild and webpack don't support it. So it requires to use a transpiler like Babel or TypeScript separately with complex config.

  • https://github.com/evanw/esbuild/issues/944
  • https://github.com/webpack/webpack/issues/5866

nanobundle will v2 provides a no-bundle esbuild configuration. And will promotes it to default behavior later. May include rebranding as it is no longer "bundle".

cometkim avatar May 02 '23 14:05 cometkim

How can I help to realize this feature? Are some one working on it?

XantreDev avatar Jul 07 '23 13:07 XantreDev

I have an strategy for this and have done some PoCs. I have to investigate more for compatibility with watch mode, but I believe I can begin late this month.

cometkim avatar Jul 12 '23 03:07 cometkim