canjs / can-connect

Model layer utilities for every JavaScript framework! Assemble real-time, high performance, restful data connections.
https://canjs.com/doc/can-connect.html
MIT License
29 stars 16 forks source link

Remove can-ajax import inside data-url behavior #445

Open DesignByOnyx opened 5 years ago

DesignByOnyx commented 5 years ago

The data-url behavior allows you to pass a custom ajax transport. However, if a consumer decides to use their own transport for all connections, the can-ajax dependency is doesn't get shaken out of the deps tree due to the hard import in can-ajax.

I'm not sure how to best solve this, as each connection will be required to pass the desired ajax transport and would likely be a breaking change.

justinbmeyer commented 5 years ago

Folks could make their own data-url if they really needed this. Might be worth keeping data-url working by default. can-ajax isn't that big.

justinbmeyer commented 5 years ago

An alternative would be to make a data-url without the hard coding (data-ajax), but data-url basically extends data-ajax into data-url.