title: Host mode files separately from Ace Editor
body: <p>I want to bundle ACE Editor with the desktop application and render it inside WebView. Ace is running from <code>file:///</code> protocol. Is there any way to host Mode files separately from <code>ace.js</code>? For example <code>ace.js</code> will be located inside the application bundle <code>/Application/MyApp.app/...</code>, but mode files at <code>~/Library/Application Support/MyApp/ace/modes</code>.</p>
  
  <p>I started with test project and have the following code</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var require = {
          baseUrl: window.location.protocol + "//" + window.location.host
                  + window.location.pathname.split("/").slice(0, -1).join("/"),
          paths: {
              "ace/mode": "/Users/user/ace-build",
          }
      };
  &lt;/script&gt;
  &lt;script type="text/javascript" src="require.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="ace/ace.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      require(["ace/ace"], function(ace){
          var editor = ace.edit("editor-container");
          editor.getSession().setUseWorker(false);
          editor.setTheme("ace/theme/xcode");
          editor.getSession().setMode("ace/mode/javascript");
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I expect that module <code>ace/mode/javascript</code> will be loaded from <code>/Users/user/ace-build/javascript</code> but it loads from <code>ace/mode-javascript.js</code>. How to make modes loading from different location?</p>