Using require.js and r.js, lets say I have a module, "myModule.js".
The r.js docs state that they support integration with has.js such that
has: {
feature: true
}
transforms something like:
if (has('feature')) {
alert('feature detected!');
} else {
alert('feature not supported')
}
to:
alert('feature detected!');
However, how can I go about creating two versions of the same module? One version for those browsers that support the feature and another version for those browsers that do not support the feature.