Sam Lee
Sam Lee

Reputation: 10463

Closure compiler trips up on "final" keyword

I am using close to compile JavaScript using Google' closure compiler. The bundle I am compiling uses a lot of packages imported by NPM, and one of the downstream dependencies uses the final keyword. This is apparently a reserved keyword in ES3, and as a result closure throws an error.

What is the way around this? I don't want to change all the dependencies to not use final. Im a using Babel in the transpilation pipeline, if that makes a difference.

Upvotes: 0

Views: 51

Answers (1)

Chad Killingsworth
Chad Killingsworth

Reputation: 14411

Use the --language_in flag to specify an input language of ECMASCRIPT5 or higher.

Upvotes: 1

Related Questions