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

Compilation error for variableName = ({anotherVariale}) => sometext i.e. Template Literals #168

Open
himanshuvardhan opened this issue Mar 28, 2019 · 2 comments

Comments

@himanshuvardhan
Copy link

himanshuvardhan commented Mar 28, 2019

Getting compilation error for the mentioned string format.

somevariable = ({anotherVar}) => sometext

getting error at the character `

@himanshuvardhan himanshuvardhan changed the title Compilation error for variableName = ({anotherVariale}) => sometext Compilation error for variableName = ({anotherVariale}) => sometext i.e. Template Literals Mar 28, 2019
@vcohen-irvinecompany
Copy link

I have a similar problem using minify-maven-plugin 1.7.6. My code is

optionsHtml += `<option value="${options[i].value}">${options[i].name + marketedNote}</option>`;

I get the following compilation error:

[ERROR] illegal character at suite-asset-****-tool.js line 329:32
                optionsHtml += `<option value="${options[i].value}">${options[i].name + marketedNote}</option>`;
                                ^

[ERROR] syntax error at suite-asset-****-tool.js line 329:32
                optionsHtml += `<option value="${options[i].value}">${options[i].name + marketedNote}</option>`;
                                ^

[ERROR] illegal character at suite-asset-****-tool.js line 329:111
                optionsHtml += `<option value="${options[i].value}">${options[i].name + marketedNote}</option>`;
                                                                                                               ^

This is a big problem for us; we're switching to use template literals as much as possible in our JS code, but for Java projects compiled with Maven we won't be able to do that. Please advise a workaround or when a fix may be coming.

@blutorange
Copy link

This is because this plugin uses a rather old version of closure compiler that did not support many new JavaScript features yet. In case you are interested, I made a fork of this plugin, removed all CSS support (to focus on one task) and keep closure compiler up to date.

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

No branches or pull requests

3 participants