vedmack / yadcf

Yet Another DataTables Column Filter (yadcf)
http://yadcf-showcase.appspot.com/
MIT License
731 stars 285 forks source link

List DataTables plugin as dependency in UMD wrapper #592

Closed galvarez421 closed 4 years ago

galvarez421 commented 5 years ago

Following up on the change made in response to https://github.com/vedmack/yadcf/issues/446, shouldn't the UMD wrapper list DataTables as a dependency for the AMD and CJS definitions? For example, see https://github.com/DataTables/Dist-DataTables-Bootstrap/blob/1.10.19/js/dataTables.bootstrap.js.

In #446, the example is CJS, which uses synchronous imports. But since AMD and ES6 imports (which can also be used in Webpack) are asynchronous, I think it's important to list all dependencies to ensure that DataTables plugin attaches to the jQuery object before the yadcf plugin tries to reference the DataTables plugin.

vedmack commented 5 years ago

@galvarez421 feel free to fork and send a PR for this issue