188
rated 0 times
[
193]
[
5]
/ answers: 1 / hits: 18493
/ 12 Years ago, mon, september 24, 2012, 12:00:00
I've created a node module that is essentially just some useful JS that can also be used client side. I know that require.js can load common.js components, but I don't necessarily want to make a mandate that everyone who uses my module client side also needs require or common.js or something. I also don't want to force them to remove the module.exports = ...
at the bottom of the file. How do others solve this problem? Do you just create 2 versions, or 2 compiled versions rather? Does module.exports work everywhere?
More From » node.js