Comments (7)
I'd like to keep this open so it's not forgotten. There's some useful info here. I'll circle back to this issue later this year.
from any-observable.
Sure, but only native ESM. I don't want any build step. You need to target Node.js 12.
You can see how I recently did it here: sindresorhus/quick-lru@a408ce9
from any-observable.
Thanks. I don't see a clear way for Karma to be used with ESM outside of an old Karma ESM package which is recommending Web Test Runner. Should I switch to that test runner?
from any-observable.
Sure
from any-observable.
Hmmm...
In order to preserve the detection and dynamic registration of your "shortcut" capabilities, I think the API would need to change to support the asynchronous nature of the dynamic native ESM imports, i.e., one would have to import an export function and await its result in order to use the Observable.
Top-level await might be usable, but would require Node 14+ (and browser support is currently very limited: https://caniuse.com/mdn-javascript_operators_await_top_level ).
Alternatively, the dynamic detection could be dropped in favor of requiring a specific implementation.
from any-observable.
What problems does making this package ESM solve? Because it sounds like converting it to ESM will cause more problems than it solves. ESM can import CommonJS.
from any-observable.
I like being able to make direct imports without a build step for browser (or polyglot) environments, but maybe it is just best to wait (or I could just make a specific fork). Will close for now then. Thanks!
from any-observable.
Related Issues (17)
- rxjs before zen-observable? HOT 3
- Documentation
- Optional import HOT 2
- Released version is missing files HOT 2
- Support most, xstream, Bacon, Kefir and Flyd HOT 5
- Doesn't seem to work with RxJS 6 HOT 2
- Shortcut registrations? HOT 1
- [Bug] Please move rxjs dependency from dev to prod HOT 2
- Support RxJS 6 HOT 2
- Register in browser HOT 2
- Just use rxjs-minimal instead of both rxjs-full and minimal HOT 1
- Browser shim
- Meta HOT 8
- Should work, even if it's not deduped.
- Allow for different export patterns. HOT 2
- Allow registration of the Observable constructor HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from any-observable.