-
Notifications
You must be signed in to change notification settings - Fork 21
Babel 7.4 - babelHelpers.taggedTemplateLiteral() now showing up in ES6 build #33
Comments
Well, it looks like this is because Safari 12 has a particular bug with Template Literals. A fix went into compat-table that is causing this. Trying to figure out from the reporter if this is something that is a real issue or what. BTW, you and the other component devs at @vaadin might want to peruse over this issue when you have time. As ES develops, having just a module/nomodule split like this project won't be as useful in the future as new proposals are added. That issue has lots of folks looking for answers. |
FYI, the Safari 12 bug is:
I may try to work on a configuration-based workaround. |
Thanks for the detailed research. Yes, my teammates have also faced this in Vaadin Flow 2.0 alpha, which is being rewritten to support ES modules. I will check the options to workaround this, it's unfortunate that Safari 12 needs some code that any other modern browsers don't 😞 |
Always Safari isn't it? Going to be fun with Edge Chromium goes live too. Right now I'm thinking a short term solution is just to ignore the bug. I use Safari 12 a bit and have never seen this issue. The reporter mentions this is a GC issue and "many" libraries have issues. Perhaps Polymer 3 & LitElement are ones that don't have issues. That would mean changing the A longer term solution might be to have two babel-helpers files. One always loaded that includes helpers for all browsers, and one loaded with a So in this case, |
Well, this issue exposed another in preset-env where you can't target between versions for plugins. Because compat-table sees that Safari 12 can't to template literals properly, preset-env says everything below version 12 can't do it either. That means doing I have upgraded the logic to create two babel-helper files. Do you want a PR on that? I've also upped the dependancies to Workbox 4 and a couple of the webpack plugins that had major number upgrades. |
@moderndeveloperllc feel free to submit a PR if you have found a working solution 👍 |
I think #34 is a decent solution. I've been using it for the past few weeks without issue. |
@web-padawan Don't think this is an issue with your code, but it's going to cause problems since babel-helpers isn't included for module builds. Updating to Babel 7.4 includes what appears(?) to be a rather big change to how
@babel/preset-env
decides what modules to polyfill. This article touches on that. Even withuseBuiltIns: false,
, it still changes.Basically, for some reason the ES6 build now thinks that all the tagged template literals (all web components) now needs a
babelHelpers.taggedTemplateLiteral
wrapper.The text was updated successfully, but these errors were encountered: