title: CEF JS loading errors (using custom scheme)
body: <p>Currently working on a CEF3 C++ project, I encountered an issue which seems pretty stubborn and really slowing the development process down.  </p>
  
  <p>Our app is supposed to serve a SPA. I read that the <code>file://</code> scheme is not well suited for loading local data into the browser, therefore we proceeded with implementing <code>CefSchemeHandler</code>and <code>CefSchemeHandlerFactory</code>, which, as of yet, do nothing more than serve us the files for our SPA.  </p>
  
  <p>Now to the problem: We specifically want to load React, React-DOM, and Babel as provided here:
      <code>https://unpkg.com/react@16.3.2/umd/react.production.min.js</code><br>
      <code>https://unpkg.com/react-dom@16.3.2/umd/react-dom.production.min.js</code><br>
      <code>https://unpkg.com/babel-standalone@6/babel.min.js</code><br>
  When loading these via a script tag from the CDN, everything works fine. I only get a cross-origin-acess error for our custom app script with mime type <code>text/babel</code>. We want to load all of then "offline" via the SchemeHandler however, and this is where the problem arises.
  If I load the scripts in windows and return them to the custom domain via the scheme handler, all we get is Syntax error at the beginning of every script. Sometimes for <code>!</code>before function, sometimes something else.<br>
  Whatever we do it just does not seem to work out.<br>
  I've already verified, all the bytes (the whole script) is being loaded into browser so there is no data loss.</p>
  
  <p><strong>What is the right way of implementing the <code>CefSchemeHandler</code> and serving local huge scripts and files to the browser?</strong></p>
  
  <p>Edit: To become more clear I would like to add that the question mainly asks about the possible causes for getting a syntax error for the exact same scripts served via a CefSchemeHandler in comparison to everything being fine loading them via file:// or through the CDN.</p>
  
  <p>Edit 2: I changed the custom scheme to https:// and the CORS is working now. However I still have a very weird issue with the js loading. Here is a specific example: I load my index.html via https (working). I then load react.js via a relative path (working)
  <code>&lt;script type="application/javascript" src="lib/react.production.min.js"&gt;&lt;/script&gt;</code>
  Then I want to load react-dom:
  <code>&lt;script type="application/javascript" src="lib/react-dom.production.min.js"&gt;&lt;/script&gt;</code>
  And I get <code>[0511/083919.988:INFO:CONSOLE(75)] "Uncaught SyntaxError: Invalid or unexpected token", source: https://test/lib/react-dom.production.min.js (75)</code>.</p>
  
  <p><strong>Now the weird thing</strong>: If I load the script (react-dom) from <code>https://unpkg.com/react-dom@16.3.2/umd/react-dom.production.min.js</code> (it's the <strong>exact same</strong> script), <strong>everything works!</strong></p>
  
  <p>Plase help me!</p>