RaveJS/rave — pull request #37 by KidkArolis (2014-06-08 10:37:05+00:00)
Title: WIP Add support for browser field in package.json

Based on the unofficial spec
https://gist.github.com/defunctzombie/4339901

This is not complete yet, but I just wanted to get some feedback before I proceed.

If the browser field is a string, I simply map that onto descriptor's main, since that what it actually means. If the browser field is an object, I create a new descriptor.map property which is then used in the normalization hook. This way both loading and requiring modules goes through the mapper

There's one more thing missing which is being able to set modules to `false` in the map to prevent them from being loaded. I was thinking about creating a `rave/blank` module and map it to that.

If this sounds ok, I'll proceed with making sure it actually works well (i.e. write tests).