-
Notifications
You must be signed in to change notification settings - Fork 60
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
[Bug] dist bundle no longer transpiled to es5 #228
Comments
I built the main branch using node 14 and I found the Looking at
and having the
results in the output bundles being transpiled to node 16 which supports optional chaining so this is left in. I'm not an expert in this space but would changing the targets to something like:
provide a generated output that is safer to use in browser? |
Hey @nzjames, thanks for raising this one. We were able to replicate the bug following the steps provided. It seems like the cause of the issue was likely a bump in the Your solution above looks good to me (thanks for that!), so we’ll shoot to get a patch release with the fix rolled out shortly. Cheers! |
hey there @robmorieson! first of all, thank you so much for the great work. we truly appreciate it 🙏 I hate to be that person but, 😭 are there any updates regarding this issue? 😭 we had to manually transpile |
@altaywtf thanks for the gentle bump — this one did fall off the radar so very much appreciated. Happy to report that a fix for this issue has now been merged and a patch release will be going out including the fix in the next few days. |
Describe the bug
Between version 2.7.4 and 2.8.0 the
dist/
portion of the package went from being transpiled to es5 to includingnullish coalescingoptional chaining in the output.Reading the release notes of 2.8.0 it does not read like this was an intentional change in the output. This manifests as a regression blocking builds when using a resolution like
^2.7.4
while not transpiling node_modules.How To Reproduce
npm install [email protected]
node_modules/react-live-chat-loader/dist/providers/chatwoot.js
and note the transpiled output starting with"use strict"
npm install [email protected]
node_modules/react-live-chat-loader/dist/providers/chatwoot.js
and note the optional chaining check on line 17fisrtScript.parentNode?...
Screenshots
No response
Relevant Log Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: