8000 Compilation error for variableName = ({anotherVariale}) => `sometext` i.e. Template Literals · Issue #168 · samaxes/minify-maven-plugin · GitHub
[go: up one dir, main page]

Skip to content
7FFF

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

Open

Description

@himanshuvardhan

Getting compilation error for the mentioned string format.

somevariable = ({anotherVar}) => sometext

getting error at the character `

Activity

  1. changed the title [-]Compilation error for variableName = ({anotherVariale}) => `sometext`[/-] [+]Compilation error for variableName = ({anotherVariale}) => `sometext` i.e. Template Literals[/+] on Mar 28, 2019
  2. vcohen-irvinecompany commented on May 14, 2019

    @vcohen-irvinecompany

    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.

  3. blutorange commented on Jun 20, 2019

    @blutorange

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0