title: Why JS cannot find the function in babel script?
body: <p>Here's my index file</p>
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;meta content=&quot;IE=Edge&quot; http-equiv=&quot;X-UA-Compatible&quot;&gt;
      &lt;meta name=&quot;description&quot; content=&quot;test&quot;&gt;
      &lt;title&gt;test&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;!-- &lt;script src=&quot;https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.0.0/dist/tf.min.js&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;https://cdn.jsdelivr.net/npm/fetch-polyfill@0.8.2/fetch.js&quot;&gt;&lt;/script&gt; --&gt;
      &lt;script src=&quot;https://unpkg.com/@babel/standalone/babel.min.js&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;/app.js&quot; type='text/babel'&gt;&lt;/script&gt;
      
      
      &lt;script type=&quot;text/javascript&quot;&gt;
          fnc();
      &lt;/script&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>And here's app.js file</p>
  <pre><code>function fnc() {
      console.log('myname');
  }
  </code></pre>
  <p>I wonder why console says:</p>
  <pre><code>Uncaught ReferenceError: fnc is not defined
      at (index):19
  (anonymous) @ (index):19
  </code></pre>
  <p>If I change script type with text/javascript, it works without problem.
  However, I need it to be babel script for tensorflow script to work in IE11.</p>
  <p>Can anybody help me out?</p>