-
Notifications
You must be signed in to change notification settings - Fork 23
feat: js module distribution #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
fix: properly bundle for browsers fix: revert code changes Reduce the intensity of the gray "flash" when enabling the `BackgroundProcessor` (livekit#96) Version Packages (livekit#99) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Cache background image (livekit#100) Version Packages (livekit#101) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 65ff5f5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
thanks for the suggestion. I don't think removing The flutter web lib is not type compatible with the JS version. |
|
Thanks for the review, I removed livekit-client during development, but re-added it during cleanup. It seems like I accidentally removed it during rebasing/merging The types are compatible enough for some basic wiring. I'm currently in the process of cleaning up my video background plugin: https://github.com/holzgeist/flutter-livekit-background-effects/tree/main/livekit_background_effects_web |
|
I see, I had another look at the current implementation and the package is already using I'm not sure what exactly your change is proposing. What exactly is missing from the bundle today for it to work for your use case ? |
|
That's because I have very little idea about javascript bundling 🙈 The output file via tsup didn't run in the browser, so I assumed it was used for something different. I'll try to play with tsup options tomorrow, maybe I'll succeed 😄 (e.g. a quick search showed the unused option |
|
ah, I see what you mean. Yeah, for this we'll likely need to create single file build. Currently tsup sets the when you say
how are you currently importing the module? |
|
It looks like the I import the script via a (programatically added) tag like this: |
|
why wouldn't you use a dynamic import for the esm version? |
|
according to the meme story in the js import library I linked above and my own tries, it's not (yet?) possible to dynamically import javascript from dart code, even when compiling for web only |
|
Update: I might have found something (using your "dynamic import" wording to start looking for something more specific): https://api.dart.dev/dart-js_interop/importModule.html |
|
I'm not sure the status of this, @holzgeist were you able to get your alternate solution to work? If not and you still are hoping this could get merged, feel free to post a message here and I'll give what you have here a shot locally. Maybe a helpful note - if you are trying to integrate this package with the umd build of |
This PR enables the bundling of this library as standalone package, e.g. for usage in the web part of livekit/client-sdk-flutter