-
-
Notifications
You must be signed in to change notification settings - Fork 97
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 package on NPM is broken #838
Comments
It will be really nice to have the The easiest workaround mentioned below, unfortunately, runs into bundling issues which I'm unable to figure out
The issues are caused by
|
There are much more issues that what you described. After 2 weeks of testing and toying around I've come to the conclusion that the REPL package in the current state is unusable as the NPM module and should be rewritten to accommodate SvelteKit SSR preloading or whatever it's called, I couldn't quite figure it out. Even with that Vite has a problem with bundling static assets of NPM modules that I couldn't figure out. I might document all of it if someone is interested but I think that the maintainers are aware of it since I figured it all out from mostly their comments on issues from the last year, but they clearly don't have the time to put into it which is understandable. As of now I found that the REPL is usable if you import it as a Git Submodule/NPM workspace in the same way it's used in this repo. I have found also that with all of the fixes it will work in Preview as the NPM module if you import the package inside "onMount", but weirdly not on Dev I suppose because of Vite asset (pre)bundling. |
I have found that I needed to do following ☑️ add also |
Please make the REPL package be available through NPM as a self contained package with a least the minimal documentation to make it usable.
I couldn't get the "@sveltejs/repl" package as it's provided through NPM to work so I played around with the package as is from this repo. It works with "marked" and "sourcemap-codec" packages added as dependencies. Also the way the package depends on "@sveltejs/site-kit" package made it impossible for me to make it work through NPM install so I included the "fonts" folder with "base.css" and "code.css" files to the package to finally make it work. It's too hacky to be viable as a proper solution and it would be nice to have the self contained package to be used through NPM that just works outside of the box.
The text was updated successfully, but these errors were encountered: