guybedford/require-css — pull request #143 by rockallite (2014-04-21 07:54:08+00:00)
Title: Fix "TypeError: Cannot call method 'replace' of undefined" error

...when using "modules" and "dir" settings in the r.js build file.

Originally `css-builder.js` check for `config.appDir` settings in the build file. If it doesn't exist, use `config.out` as the output path. Otherwise, use `config.baseUrl` as the parent directory.

However, that kind of check is just wrong. According to the [document](https://github.com/jrburke/r.js/blob/master/build/example.build.js), `appDir` is optional. What really needs to check is the `dir` option, which must be used together with `modules`.