exclude paths from external[]
I want to do something like this...
external: [
'./path/*',
'!./path/bundle-this/*'
]
I second that. It would be very helpful
Possibly equivalent to:
- https://github.com/evanw/esbuild/issues/3215
I'd be very interested in this feature as well. A project may have many dependencies. When we need to externalize only a small subset of those — as is likely to be true for a library published to npm — having to list every dependency except the one intended is fairly challenging to maintain safely, particularly in a monorepo.
+1 to this. For my usecase, I don't want to bundle anything, and I want to let the installation happen in the cloud. However there are some private packages that are internal to my org that I do want to publish (but only them).
So ideally I want either:
external: [
'*',
'!@private/foo',
]
or for the external field to accept a function where i can determine the desired behavior myself.
for the
externalfield to accept a function where i can determine the desired behavior myself
There is already a way to do this for yourself: https://esbuild.github.io/plugins/#on-resolve
for the
externalfield to accept a function where i can determine the desired behavior myselfThere is already a way to do this for yourself: https://esbuild.github.io/plugins/#on-resolve
That's neat. Would it be possible to add this as a note in the external api section in the docs for the next guy?