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

Minimizer breaks some Javascript Files when used in polymer-cli #706

Closed
jogibear9988 opened this issue Oct 8, 2017 · 4 comments
Closed

Comments

@jogibear9988
Copy link
Contributor

There are a few issues on polymer-cli, wich breaks javascript files, when babel/minify is used inside.

https://github.com/Polymer/polymer-cli/issues/633
https://github.com/Polymer/polymer-cli/issues/886
https://github.com/Polymer/polymer-cli/issues/701

i think it's a utf8 encoding issue, but i don't know if it's in polymer-cli or babel or babel-minify. maybe someone here can help out?

@jogibear9988 jogibear9988 changed the title Minimizer breaks some Javascript Files Minimizer breaks some Javascript Files when used in polymer-cli Oct 8, 2017
boopathi added a commit that referenced this issue Nov 18, 2017
+ 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
boopathi added a commit that referenced this issue Nov 18, 2017
+ 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
@jogibear9988
Copy link
Contributor Author

jogibear9988 commented Nov 18, 2017

is this also fixed: https://github.com/Polymer/polymer-cli/issues/886 ?

 identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",

the \0 will be replaced

28e671e2-132d-11e7-8bc6-b44a5e84a20e

@jogibear9988
Copy link
Contributor Author

@boopathi can you look if this also works?

@jogibear9988
Copy link
Contributor Author

@boopathi Please reopen this!

I've now tried again. Issue still exists.

You can try. Download jquery.min.js from https://code.jquery.com/jquery-3.2.1.min.js and run babel-minfy on it.

Some of the \0 in the file will be replaced with Ascii NUL and break the script!

@jogibear9988
Copy link
Contributor Author

@boopathi you can keep this closed. I've created a new issue, since this has nothing to do with polymer cli

issue: #732

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants