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

More descriptive error message when bundle already defined #112

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Ambient-Impact
Copy link

After trying to track down some errors in a project, I noticed LoadJS just throws "LoadJS" without any additional information as to what caused it. This outputs the bundle ID that is already defined (which causes the error to be thrown) in a more descriptive error message.

@Ambient-Impact Ambient-Impact changed the title Error thrown when bundle already defined now says which bundle. More descriptive error message when bundle already defined Oct 25, 2024
@amorey
Copy link
Member

amorey commented Oct 25, 2024

A more descriptive error message would be very helpful but the promise we made with this project is to keep the number of bytes down as much as humanly possible and this change adds 26 bytes to the gzipped output. Is there a way we can make the error more descriptive while keeping the byte count down?

@Ambient-Impact
Copy link
Author

I hadn't considered that. It might be possible to reduce the size with clever use of this or that, but it's not something I have much experience with. I'm mostly coming at this with the aim to save other people some frustration. I suppose you could just output the bundle ID alone and that would be an improvement and hopefully not change the size with gzipping?

@amorey
Copy link
Member

amorey commented Oct 28, 2024

Outputting the bundle ID sounds good to me. It will probably actually decrease the bundle size. Do you want to make the change in the PR?

@Ambient-Impact
Copy link
Author

Sorry that took so long - been busy with a lot of other stuff.

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

Successfully merging this pull request may close these issues.

2 participants