Skip to content
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

Thoughts on building esm at python packaging time #71

Open
paddymul opened this issue Nov 19, 2024 · 1 comment
Open

Thoughts on building esm at python packaging time #71

paddymul opened this issue Nov 19, 2024 · 1 comment

Comments

@paddymul
Copy link
Collaborator

What are your thoughts on a pattern like this?

In the future, when I care about bundle sizes of my widget, I would prefer not to ship sucrase in the bundled JS. My _esm cproperties are very small, essentially shims between my component library and ipyreact. What would it look like if there was no sucrase shipped with js bundle. (I'm not worried about the time it takes to execute sucrase, this should be minimal.

What if the _esm blocks were hashed and compiled in a step. Then there was a shipped dictionary from _esm_hash to compiled js. The frontend code references this dictionary in production mode, and the 1mb sucrase dependency doesn't ship.

This is a pretty advanced optimization that I don't think I'll get to for a while, if ever. but curious on your thoughts

@paddymul
Copy link
Collaborator Author

As I think about it, I'm trying to figure out if I will need to fork ipyreact to suit my needs. I'd prefer not to. I'm just thinking about plans for my roadmap.

Here are the things I'd like to do which would require js changes to ipyreact

  1. Easier CSS importing. Nice to have. I figured a widget side workaround. related to this bug
    Importing custom css Importing custom css #39
  2. Passing custom messages back and forth to the kernel. Is custom message passing possible? Is custom message passing possible? #70
  3. This bug. building esm at python packaging time Thoughts on building esm at python packaging time #71 - the least important of the core changes I'd like

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

No branches or pull requests

1 participant