Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a debug mode #117

Open
DannyvanderJagt opened this issue Mar 8, 2022 · 0 comments
Open

Adding a debug mode #117

DannyvanderJagt opened this issue Mar 8, 2022 · 0 comments

Comments

@DannyvanderJagt
Copy link

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:

Included packages: [ ..... , ..... ]
Excluded packages: [ ..... , ..... ]

Or an detailed list of the internal results from these two checks:

 utils.contains(nodeModules, moduleName) &&
 !utils.containsPattern(allowlist, request)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant