As written in another issue jspm currently supports the "browser" field only for npm installs. I think it would be really useful to support this in jspm itself, especially when trying to make npm source repositories compatible to jspm.
In my case, I develop an npm package which uses transpilation and "browser". For development purposes it would be nice to be able to depend on that package as a normal github dependency from jspm. And the browser field support is the last missing piece for that: https://github.com/Reading-eScience-Centre/covjson-reader/blob/d21eaf68517881f7bcc17cf5c36388d089c08a56/package.json#L44 An alternative main entry point for jspm is really not a convenient solution here.
Is there any chance for adding such a feature? Or a good reason not to have it?
In jspm we encourage conditional package configuration over this existing browser convention. This can currently be done in jspm 0.17 with a package.json containing:
What are the conditions exactly in general?
Documentation is lacking but currently the core system conditions are browser, production and node. Custom conditions can be configured as well, although this is currently still an undocumented workflow for packages.
Seems like production is a thing that could be combined with browser or node. How would that look like then? And what is it anyway? Is the "default" mode something like development?
jspm bundle and bulid will by default bundle for the browser in production. This can be altered by providing the --node or --dev flags to the build commands. SystemJS builder allows fine-grained setting of conditions though.