title: How to Load Dependencies Relative to Defining Module
body: <p>I made a library project so I can share a formatter and some custom controls between applications. This works pretty well, it's just adding the library to the <em>neo-app.json</em> file. Now I can load my common formatter:</p>
  
  <p><em>app/neo-app.json</em></p>
  
  <pre><code>{
      "path": "/resources/shared/",
      "target": {
          "type": "application",
          "name": "mysharedlibrary",
          "entryPath": "/"
      },
      "description": "My shared library"
  }
  </code></pre>
  
  <p><em>app/Controller</em></p>
  
  <pre><code>sap.ui.define([
      "shared/formatters"
  ], function(formatters) {
  //etc
  </code></pre>
  
  <p>Then I wanted to add a shared base controller, which already has the formatters set. So I go into my shared library project and add a controller, then add the formatter:</p>
  
  <p><em>mysharedlibrary/SharedController</em></p>
  
  <pre><code>sap.ui.define([
      "sap/ui/core/mvc/Controller",
      "formatters" /* &lt;----- this is the problem */
  ], function(Controller, formatter) {
      "use strict";
  
      return Controller.extend("shared.SharedController", {
          formatter: formatter
      });
  });
  </code></pre>
  
  <p>And then use it in my app:</p>
  
  <p><em>app/Controller.js</em></p>
  
  <pre><code>// fails. Shared base controller can't load formatter. 
  sap.ui.define([
      "shared/SharedController"
  ], function(Controller) {
      "use strict";
  
      return Controller.extend("my.app.controller.App", {
  
      });
  });
  </code></pre>
  
  <p>This approach doesn't work. The app implementing this controller can <strong>find</strong> the controller, but then loading the formatter into the shared controller seems to fail because it can't be found. I'm not sure how to make the Shared Controller load files <em>relative to it's own path</em> instead of relative to the implementing application's path.</p>
  
  <p>What do I put in the <code>SharedController</code> file to load the formatters?</p>