di.js
di.js copied to clipboard
Exporting DI as a CommonJS module
I might be missing a point, but I hope you could clarify me. Would there be any issues with exporting di as CommonJS module so it can naturally be used in node with simple require('di-lite');
?
I've added an index.js file requiring './di-lite' and added a simple export ceremony like:
if (module && module.exports) {
module.exports = di;
}
for testing and it seems to be working. Is there something am not foreseeing? Would this affect the operation of the library in the browser?
+1