dnt icon indicating copy to clipboard operation
dnt copied to clipboard

Customise shim per entrypoint

Open halvardssm opened this issue 2 years ago • 1 comments

Hi! I have been using this package for a little while, and stumbled now upon a slight issue. When creating a multi-entrypoint package where each entrypoint supports a different subset of features, for example:

  • one entrypoint for system, where fs and env is needed
  • one entrypoint for browser, where document is needed
  • one entrypoint for react components etc

It would be great if each entrypoint (the interface EntryPoint) would contain a shims property (interface ShimOptions) that would override the top-level shims property.

halvardssm avatar Jul 07 '23 06:07 halvardssm

@dsherret I could potentially assist with a PR here, but could you give me some pointers on where you think this change should happen? I had a look through the codebase, and it seems a bit like a larger refactor would be needed, so if you have any pointers, that could save me a lot of time :)

halvardssm avatar Mar 14 '24 09:03 halvardssm