title: Recreate Module with Require.js
body: <p>I implemented my modules to be singleton in my UI application. I used Require.js to load them.
  I need a way to destroy some module and recreate it again by Require.
  Is there a way to do it?</p>
  
  <p>Here is an example of one of the modules:</p>
  
  <pre><code>define(['viewmodels/factory'], function (factory) {
      var vm = factory.createViewModel(function () {  
          var baseViewModel = this; 
          var self = this;
      });
      return new vm();    // create as singleton
  });
  
  define(function (require) {
      "use strict";
  
      return {
          createViewModel: function (ctor) {
              ctor.prototype = new (require("viewmodels/baseViewModel"))();
              ctor.prototype.constructor = ctor;
              return ctor;
          }
      };
  });
  </code></pre>