You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have wrapped all my AMD modules in the simplified CommonJS wrapper. Sometimes I set properties on exports, but if I only want to export one object, I'm assigning it to module.exports. I found a case where amdclean generates invalid code, I've made an example: https://github.com/herrernst/amdclean-module_exports-testcase. It works when using requirejs dynamically and also optimized with r.js, but processing it with amdclean, it doesn't (second console.log prints undefined). In line 24, when setting the main module, the callback function parameters are exports and _config_, but in line 32, the parameters passed for execution of the function are exports and animal, the latter being wrong (causing config being assigned to animal in the body of the function).
It would be great if you could look into that, thank you. I'm loving this project, by the way!
The text was updated successfully, but these errors were encountered:
I have wrapped all my AMD modules in the simplified CommonJS wrapper. Sometimes I set properties on
exports
, but if I only want to export one object, I'm assigning it tomodule.exports
. I found a case where amdclean generates invalid code, I've made an example: https://github.com/herrernst/amdclean-module_exports-testcase. It works when using requirejs dynamically and also optimized with r.js, but processing it with amdclean, it doesn't (secondconsole.log
printsundefined
). In line 24, when setting themain
module, the callback function parameters areexports
and_config_
, but in line 32, the parameters passed for execution of the function areexports
andanimal
, the latter being wrong (causingconfig
being assigned toanimal
in the body of the function).It would be great if you could look into that, thank you. I'm loving this project, by the way!
The text was updated successfully, but these errors were encountered: