While using this externals package I ran into an issue where packages weren't bundled that were suppose too.
It turned out to be a mistake by me, but it was far from obvious.
A use case to illustrate:
We are using the package accessible-autocomplete but in the code it's actually imported as accessible-autocomplete/preact. When I added "accessible-autocomplete" to the allowlist it didn't include it in the bundle.
After a bit too many hours, I ended up debugging this package and found the problem.
Debug mode
It would be nice to add a debug mode to this package that will output exactly which packages were included and excluded from the bundle.
It could output a simple for formatted list like this:
While using this externals package I ran into an issue where packages weren't bundled that were suppose too. It turned out to be a mistake by me, but it was far from obvious.
A use case to illustrate:
We are using the package
accessible-autocomplete
but in the code it's actually imported asaccessible-autocomplete/preact
. When I added"accessible-autocomplete"
to theallowlist
it didn't include it in the bundle. After a bit too many hours, I ended up debugging this package and found the problem.Debug mode
It would be nice to add a debug mode to this package that will output exactly which packages were included and excluded from the bundle.
It could output a simple for formatted list like this:
Or an detailed list of the internal results from these two checks:
See here. They include regex and string comparison checks that will easily fail on typos or a slightly different naming like the use case above.
What do the contributors think? I'm happy to create a PR and propose something.