Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not compatible with CommonJS #2722

Open
IvanGuardado opened this issue Jun 12, 2015 · 3 comments
Open

Module not compatible with CommonJS #2722

IvanGuardado opened this issue Jun 12, 2015 · 3 comments

Comments

@IvanGuardado
Copy link
Contributor

IvanGuardado commented Jun 12, 2015

Here the code is accessing to the Slick global variable directly without taking in account that Slick could be defined in the exports variable.

https://github.com/mootools/mootools-core/blob/master/Source/Element/Element.js#L264

The module should be defined like the other, using:

;function(){
  //code...
}).apply(/*<CommonJS>*/(typeof exports != 'undefined') ? exports : /*</CommonJS>*/this);


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@stefanklokgieters
Copy link

What is the exact fix here? :)

@IvanGuardado
Copy link
Contributor Author

@stefanklokgieters two years after I don't remember so well but the module should be defined following the CommonJS convention like the others.

@stefanklokgieters
Copy link

I fully get that... :)

Can you perhaps try to help me a bit further anyway? What changes exactly needed to be made? I am familiar with the ModuleJS conventions but I am not sure what you exactly mean with the proper definition. All the help is very welcome, thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants