title: ReactJS can't load files in src
body: <p>I have the following code in a file called index.html:</p>
  
  <pre><code>&lt;head&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react-dom.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.js"&gt;&lt;/script&gt;
      &lt;script src="src/Test2.js" type="text/babel"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div id="asdf"&gt;&lt;/div&gt;
      &lt;script type="text/babel"&gt;
  
          class Test extends React.Component {
              render() {
                  return (&lt;h&gt;asdf&lt;/h&gt;);
              }
          }
  
          ReactDOM.render(
              &lt;Test/&gt;,
              document.getElementById('asdf')
          );
  
      &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I am trying to use code I've put in a file called Text2.js which is in a folder called src however I get the following error when I run the above code in chrome:</p>
  
  <pre><code>browser.js:5773 Failed to load file:///Users/.../src/Test2.js: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
  </code></pre>
  
  <p>How can I fix this? Thanks</p>
  
  <p>PS: here is my folder structure:</p>
  
  <pre><code>../reactTutorial  
  ../reactTutorial/index.html  
  ../reactTutorial/src  
  ../reactTutorial/src/Test2.js  
  </code></pre>
  
  <p>In case this is relavent I am on a mac, also here is the code in Text2.js:</p>
  
  <pre><code>var Test2 = React.createClass({
      render: function() {
          return &lt;div&gt;This is Test2&lt;/div&gt;;
      }
  });
  </code></pre>