8000 feat(js): add browser config by wolfv · Pull Request #1246 · conda/rattler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(js): add browser config #1246

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat(js): add browser config #1246

wants to merge 2 commits into from

Conversation

wolfv
Copy link
Contributor
@wolfv wolfv commented Apr 9, 2025

This adds a "iife" config so that we can load the JS file and access rattler through window.Rattler ....

It works for my usecase in Retool, although I am not totally sure if there is another way with the modules we have already.

Copy link
Collaborator
@baszalmstra baszalmstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant the normal esm build just be in that format?

@trim21 Thoughts?

@trim21
Copy link
Contributor
trim21 commented Apr 9, 2025

Cant the normal esm build just be in that format?

@trim21 Thoughts?

Although I would prefer downstream projects use a bundler to pack them, but it's not a bad idea to add this, I don't have strong opinion on this.

@wolfv wolfv changed the title add browser config feat(js): add browser config Apr 9, 2025
@wolfv
Copy link
Contributor Author
wolfv commented Apr 11, 2025

Any idea why the tests are failing here? I triggered them on main and that doesn't show the same failure (#1249).

Is jest trying to use the browser files for some reason? Should we put them in a different folder? Like dist-browser? So that jest doesn't discover them?

@trim21
Copy link
Contributor
trim21 commented Apr 12, 2025

run build-cjs after run build-wasm should fix it, or add this output in rollup.config.esm.js would also fix it

we should consider fix this building
order bug in other pr, merging rollup config files or maybe dropping cjs since nodejs support loading esm in cjs in all lts version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0