Replies: 5 comments 5 replies
-
@danilowoz Do you have any updates on this? This this experimental bundler still being explored? Is there a place to provide feedback on the current implementation? |
Beta Was this translation helpful? Give feedback.
-
Hi @danilowoz , what's the current status on the new bundler? (I see it's being worked on) |
Beta Was this translation helpful? Give feedback.
-
Hi @danilowoz Do you have any ideas of why it's broken and how to fix it? |
Beta Was this translation helpful? Give feedback.
-
One thing I have noticed in trying this and wanted to flag in case you weren't aware. It doesn't seem to load Tailwind (using |
Beta Was this translation helpful? Give feedback.
-
I found a bundling error with the dependency: @petamoriken/float16. In its package.json there are two exports: one for "." and one for "./inspect". The "./inspect" entry is not intended for browser use, it's for use on node/deno not in the browser. But the bundler nonetheless tries to load the /inspect entry and then fails due to a missing node dependency ("util"). I can work around the problem by patching in util or patching the upstream library, but that's not necessary with other bundlers. I would think the bundler ought not be trying to process exports that are not imported. wdyt? |
Beta Was this translation helpful? Give feedback.
-
Sandpack bundler v2 [very beta]
The Sandpack bundler v2 aims to eventually replace the current sandpack with a more streamlined and faster version. Plus, it allows us to implement even more improvements in the future, thanks to a fresh codebase that allowed us to remove many of the bottlenecks from the previous bundler.
The new bundler:
Same benefits from the previous bundler
Security
The bundler evaluates and transpiles all files in an iframe under a different subdomain. This is important because it prevents attackers from tampering with cookies of the host domain when evaluating code.
Scoped styles/javascript execution
There’s no risk of any executed code affecting the main page, which avoids unexpected styles or unhandled errors.
Performance
We heavily make use of Web Workers for transpilations, and only for those sandboxes that are in the viewport and the user is interacting with, meaning that we only use resources as needed.
Bundle Size
Another reason to host the bundler externally is because of code splitting: we split all our transpilers away and load them on-demand.
React DevTools
Sandpack bundler supports running
react-devtools-inline
in isolated mode, as an external dependency, which means you can run more than one instance per page and lazily load it.Others
Benchmarking
[1] idle - peek
[2] Exclude local resource & external, except sandpack & disabled cache;
[3] Incognito window (fresh cache) & Fast 3G
[4] Cache enabled & Fast 3G
[5] Incognito window (fresh cache) & no throttling
Known issues / what’s next
react-devtools-inline
protocol;package.json
changes;How to test it & how to use it
How to test
https://codesandbox.io/s/new-bundler-0xee8i
How to use
Hope it addresses most of the problems we've seen on #295. We're looking forward to hearing any feedback about this new version, so please feel free to leave any questions here or create an issue for bug reporting in this repository.
Beta Was this translation helpful? Give feedback.
All reactions