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

misc(esbuild): Log warning when attempting to inject debug IDs with esbuild bundle option active #526

Merged
merged 2 commits into from May 3, 2024

Conversation

lforst
Copy link
Member

@lforst lforst commented Apr 17, 2024

Relates to: #445 (comment)

@lforst lforst requested a review from Lms24 April 17, 2024 15:07
@@ -50,6 +51,12 @@ function esbuildDebugIdInjectionPlugin(): UnpluginOptions {

esbuild: {
setup({ initialOptions, onLoad, onResolve }) {
if (initialOptions.bundle) {
logger.warn(
"Esbuild's `bundle` option is currently not supported! Esbuild will probably crash now."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: Did I understand the issue correctly that this only happens for bundle: true? In this case, maybe we tell users this specifically:

Suggested change
"Esbuild's `bundle` option is currently not supported! Esbuild will probably crash now."
"Esbuild's `bundle: true` option is currently not supported! Esbuild will probably crash now."

Also, is there anything we can recommend them here instead of just saying that their build will crash?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely valid point. I updated the wording!

@lforst lforst requested a review from Lms24 April 19, 2024 11:43
@lforst
Copy link
Member Author

lforst commented May 3, 2024

@Lms24 would you mind taking another look?

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, sorry this fell through. LGTM and thx for making the change!

@lforst lforst merged commit fd2a99c into main May 3, 2024
16 checks passed
@lforst lforst deleted the lforst-warn-on-esbuild-bundle-option branch May 3, 2024 11:33
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.

None yet

2 participants