Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

I use gradle to build and deploy on Heroku, but not support ES6


Build log heroku:

scripts.bundle.unminified.js:510: ERROR - this language feature is only supported for ECMASCRIPT6 mode or better: default parameter. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features. KTDialer.createInstances = function(selector = '[data-kt-dialer="true"]') {


I don't know where to set --language_in=ECMASCRIPT6

Please help me - -


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Hi Evandro Kumasaka

Sorry for the delay. At the moment, we only support gulp and webpack builds. The Metronic assets work perfectly on these two build tools. We did not test it on Gradle build. By right, any build tools should work with javascript codes. Please refer to the Gradle documentation and forum regarding this issue.

Thanks



Hi Faizal!,
I changed the build.gradle to:

languageMode: 'ES6',
targetLanguage: 'ES6', //Can go from ES6 to ES5 for those bleeding edgers

It worked. But it's still throwing an exception:


Closure uglify JS Exception
com.google.javascript.jscomp.CompilerOptionsPreprocessor$InvalidOptionsException: ES6 is only supported for transpilation to a lower ECMAScript version. Set --language_out to ES3, ES5, or ES5_STRICT.



Hi Evandro Kumasaka,

Maybe this could help. Update your grade configuration;


languageMode: "ES6",




Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(