-
-
Notifications
You must be signed in to change notification settings - Fork 222
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] Removal of quotes for property names with special unicode still broken #627
Comments
Also, please see my earlier comment:
It looks like both |
This is indeed a problem, our build is now working in Firefox with the changes of #543 but still doesn't work with Safari. So this is the last issue holding us back from migrating completely to babili |
Using babili I get the following!
Around here:
|
@damianobarbati Can you link to a test case that reproduces the issue? That comment doesn’t include U+2160. |
Unfortunately I can't 😞 |
I just ran into the same problem as @patrick-steele-idem. Worked around the issue by adding the following options to the minify command: This disables the two plugins that are breaking the output code (babel-plugin-minify-constant-folding and babel-plugin-transform-property-literals). |
For anybody running into this using const MinifyPlugin = require('babel-minify-webpack-plugin');
// webpack settings
plugins: [
new MinifyPlugin({
evaluate: false,
propertyLiterals: false
})
] |
I'm getting the same issue with https://github.com/mozilla/pdf.js . The first place it starts failing is for |
In "babel-plugin-minify-constant-folding" it can be solved by inserting
|
In polymer cli i also get this code:
from jquery to break: https://github.com/Polymer/polymer-cli/issues/886 |
+ t.valueToNode(<objectExpressionNode>) returns an object expression node and again but with a few other effects - it removes the quotes from property names for some unicode which is not supported in Safari and a few other older browsers. So we bail here and let propertyLiterals plugin handle the conversion of StringLiterals to Identifiers. + Fix #627 + Fix #706
+ t.valueToNode(<objectExpressionNode>) returns an object expression node and again but with a few other effects - it removes the quotes from property names for some unicode which is not supported in Safari and a few other older browsers. So we bail here and let propertyLiterals plugin handle the conversion of StringLiterals to Identifiers. + Fix #627 + Fix #706
Despite PR #543 - Fix removal of quotes from property names, there is still a problem with how quotes are removed from property names that can be noticed when trying to load the minified he library in the latest Safari.
To clarify, given the following input file:
The babili output is the following:
If you try to load that in Safari you get the following error:
Thoughts?
The text was updated successfully, but these errors were encountered: