-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
REPL: be able to search/add plugins/presets from npm and try them out #858
Comments
Or instead of making every babel plugin export a UMD build (or download the cjs version and transpile to umd which would limit to a single file plugin), something with tonicdev? @boucher |
So, here are a number of thoughts (given stuff we are trying on tonicdev):
If we got this working, then you can conceivably pull this off with a Tonic embed. You'd have two notebooks, your plugins definition, which then requires the main repl. You can have the embed be secret, and have a nicer UI where you just checkbox plugins or type your own in, and under the hood you generate it.
|
Also https://runkit.com is a possibility. |
👍 Yeah ^ it was tonicdev when I first talked about this |
Hmm, this is an interesting issue. Would love to help out. CodeSandbox and WebpackBin use the same service to package all npm dependencies, simply said we create a UMD build for any given combination of packages and cache it. In the case of CodeSandbox the transpiling (using babel) is done in the browser. This is already modular, as in, you could add any babel plugin as long as they don't rely on node native modules to work (recently added codesandbox/codesandbox-client#16). I don't think it should be a lot of work to add this functionality to the REPL as well, I can hack at it this weekend. |
We've recently done a big push to ramp up embed use, so now might be a good time to chat. I think there would still be some challenges, but we're in a good place now to possibly start tackling them. |
Should we organize a video call to talk about that? Are you on Slack already? |
An idea, we can use bundle.run for that. For example if you require |
Was done in #1518 and should be easier via codesandbox rewrite |
The idea could be to have a search bar or something that could at least download the plugin and then recompile in the repl (w/ https://npmcdn.com/ + modifying
scripts/repl.js
which uses https://github.com/Daniel15/babel-standalone)? that or we use ASTExplorer somehowI know there's tonicdev/webpackbin but I don't think we can use those themselves to augment the repl - maybe need to see how it works? edit: also requirebin
The text was updated successfully, but these errors were encountered: