Global 'module' method conflict

50 views
Skip to first unread message

R. LANG

unread,
May 8, 2014, 8:26:01 AM5/8/14
to polym...@googlegroups.com
Hi,

I'm trying to integrate polymer in an existing application and encountered an issue with the global 'module' method exported by https://github.com/Polymer/platform-dev/blob/master/src/module.js 

Some of my external libs provides support for both nodejs modules and AMD using a pattern like :

(function (name, definition) {
  if (typeof module != 'undefined') module.exports = definition()
  else if (typeof define == 'function' && typeof define.amd == 'object') define(name, definition)
  else this[name] = definition()
}( //...


I will submit pull request to these libs to use a more robust check so they can work with Polymer, but isn't a global 'module' method prone to conflict with other existing library ?
Should I open an issue, or is it mean to stay this way and my other libs to improve their nodejs module detection pattern ?


Best regards,
R. LANG.

rfl10...@gmail.com

unread,
Jun 5, 2014, 7:06:01 AM6/5/14
to polym...@googlegroups.com, rfl10...@gmail.com, sjm...@google.com
Reply all
Reply to author
Forward
0 new messages