title: How to make script type both text/babel and module?
body: <p>It works perfectly because I haven't included JSX, but when I replace the script type with <code>text/babel</code>, it doesn't work because the module fails to load. <code>browser.js</code> the Babel compiler.</p>
  
  <p>Here... JSX works only when i replace script type with <code>text/babel</code> but the problem is module fails to load since the script is not module. Any idea how make it work with JSX?</p>
  
  <pre><code>&lt;div id="root"&gt;
  
  &lt;/div&gt;
  &lt;script type="module"&gt;
      import  './react.min.js';
      import  './react-dom.min.js';
      import  './browser.js';
      class Hello extends React.Component {
          render() {
              return React.createElement('div', null, `Hello ${this.props.toWhat}`);
          }
      }
      ReactDOM.render(
          React.createElement(Hello, {toWhat: 'World'}, null),
          document.getElementById('root')
      );
  &lt;/script&gt;
  </code></pre>