You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to bundle the dependencies for my website in a single .js file. It has been an absolute breeze until now, but when I build for production (using the CLI with --minify), the code breaks. Using esbuild without --minify-syntax and adding the other 2 --minify-* flags, the code works perfectly. I created a minimal example with the only dependency that breaks (toastr.js v2.1.4, the latest version).
Here's the example.js file I made for this bug report:
importtoastrfrom'toastr';export{toastr};
And the example html I use in browser to see that it breaks:
<head><!-- CSS added to actually see something if it works --><linkrel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.4/toastr.min.css" />
<scriptsrc="./something.js"></script></head><body><script>bundled.toastr.info("Something","Something else")</script></body>
This command for bundling the example.js file makes everything work as intended (the toastr toast is correctly rendered without any errors):
From what I see (but I might be wrong), the function that is not found is moved inside the wrong scope.
I wish I could help more, but I don't know any more specifics. I hope what I gave here is enough!
Anyways, thank you so much for your awesome project!
The text was updated successfully, but these errors were encountered:
Hey!
I've been trying to bundle the dependencies for my website in a single .js file. It has been an absolute breeze until now, but when I build for production (using the CLI with
--minify
), the code breaks. Using esbuild without--minify-syntax
and adding the other 2--minify-*
flags, the code works perfectly. I created a minimal example with the only dependency that breaks (toastr.js v2.1.4, the latest version).Here's the example.js file I made for this bug report:
And the example html I use in browser to see that it breaks:
This command for bundling the example.js file makes everything work as intended (the toastr toast is correctly rendered without any errors):
While this one (the exact same as above, but adding
--minify-syntax
) does not:For the record:
From what I see (but I might be wrong), the function that is not found is moved inside the wrong scope.
I wish I could help more, but I don't know any more specifics. I hope what I gave here is enough!
Anyways, thank you so much for your awesome project!
The text was updated successfully, but these errors were encountered: