packages/babel-standalone/examples/scriptTag-inline.htm

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title>babel-standalone example - Script tag</title>
</head>
<body>
  Using Babel <strong id="version"></strong>:
  <pre id="output">Loading...</pre>

  <script src="../babel.js"></script>
  <script type="text/babel">
    const doStuff = () => {
      const name = 'world';
      document.getElementById('output').innerHTML = `Hello ${name}`;
      document.getElementById('version').innerHTML = Babel.version;
    };
    doStuff();
  </script>
</body>
</html>