sindresorhus / any-observable

Support any Observable library and polyfill
MIT License
70 stars 12 forks source link

Register in browser #24

Open dy opened 4 years ago

dy commented 4 years ago

Parcel, babel, browserify and webpack seem to support optional require:

let Observable
try { Observable = require('zen-observable') } catch (e) {}

Is there any sense to enable register-shim to detect available observable libs as well?

sindresorhus commented 4 years ago

I guess. PR welcome (including tests and docs).

dy commented 4 years ago

Interesting how would that be possible with top-level await import() - via import maps?