in `main.js`

```
    require.config({
    waitSeconds: 15,
    urlArgs: "version=" + new Date(), //to make sure we have no caching problems during development
    deps: ["main"],
    baseUrl: '../js/',
    paths: {
    "jquery": "jquery-1.11.0",
    "myliba": "myliba"
    },

    shim: {
     "myliba": {
        exports: "myliba",
        deps: ["jquery"]
      },
      "jquery": {
        exports: "$"
      }
    }
    });

require(["myliba"], function () {
    myliba.test();
});

```

in `myliba.js`

```
define("myliba", function () {

            var myliba = {};

            test: function (){
             alert("requireJs is easy to use, it is well worth the hassle");
            }

});

```

results in

> 
> Uncaught ReferenceError: myliba is not defined
> 
> 
> 

if I add an `alert("lovin requirejs");` into `myliba` I very well get the alert, so it gets loaded and evaluated. My define of myliba does not get exported though.

I read [**--->here<---**](https://stackoverflow.com/questions/11389715/requirejs-use-autoloading-deps-with-shim/11397825#11397825) that you cannot declare the arguments within the function call if you do it the shim way.

As far as I am concerned, there is no other clean way other than shim. Just imagine I have:
jquery, jqueryui, myliba, mylibb

myliba depends on jquery

**mylibb depends on jqueryui and myliba which depends on jquery**

I couldn't come up with a clean way other than shim