Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Hi Evandro Kumasaka,

Maybe this could help. Update your grade configuration;


languageMode: "ES6",


https://stackoverflow.com/a/46805560

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

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


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(