babeljs - How to transpile inline/embedded javascript using babel? -


i use "babel" command transpile es6 script es5.

ex: babel testes6.js --out-file testes5.js

it works fine. question how transpile inline javascript. ex: test.html

<html>    <head>       <script type="text/javascript">           //es6 scripts       </script>    </head> </html> 

according babel docs, supports scripts typed text/ecmascript-6 or text/babel. add browser build page , set proper type scripts.


Comments