Skip to content

Build throws syntax errors for ES6+ code even when transforming back to ES3 #89

@estermer

Description

@estermer

Look like this is a recurring issue but I wanted to open this anyways.

for reference:
Stack Overflow Question
Dojo Bug Ticket

It is my understanding that by adding optimizeOptions with languageIn/languageOut (which are also defaulted) the Closure Compiler will transform the ES6+ code to an earlier version of ECMAScript.

When we do this, it looks like in the process of the build, there is a util/build/transform/depsScan to see if the module and its deps are "Pure AMD" BEFORE the transformation of langIn -> langOut happens.

Is it absolutely necessary to keep the order of the gates as is, or can we reorder them so that the transformation to ES5- happens first and then the AST depsScan happens next?

Is there a status on how to solve this issue? Or should I just live with all the console errors and ignore them since what is a syntax error is being transformed anyways?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions