canjs / can-util

Essential utilities used by lots of CanJS's projects.
https://canjs.com/doc/can-util.html
MIT License
10 stars 8 forks source link

Add support for slim loader #400

Closed m-mujica closed 6 years ago

m-mujica commented 6 years ago

In a slim build, the global System is not set and can-util/js/import/ will just resolve the import with empty module.

This change makes it so can-import checks for stealRequire and calls steal.import (which is transpiled to stealRequire.dynamic during the slim build) instead of resolving right away.

m-mujica commented 6 years ago

@matthewp just made the change, mind if I merge?

matthewp commented 6 years ago

👍