I'm just curious why is this? Might it make sense to instead use this package (rollup-plugin-svelte) inside the REPL and unify the duplication? If not, what is the barrier? I see lots of non-browser-compatible invocations such as writeFileSynchttps://github.com/sveltejs/rollup-plugin-svelte/blob/master/index.js#L101, and am wondering if they could be possibly refactored to support a browser environment as well.
I'm currently exploring ways of compiling Svelte programs in the browser and am eager to learn the best way to make this happen.
I notice that this plugin is not used in the Svelte REPL implementation, but instead the REPL indroduces its own Rollup plugin https://github.com/sveltejs/svelte-repl/blob/master/src/workers/bundler/index.js#L101
I'm just curious why is this? Might it make sense to instead use this package (
rollup-plugin-svelte
) inside the REPL and unify the duplication? If not, what is the barrier? I see lots of non-browser-compatible invocations such aswriteFileSync
https://github.com/sveltejs/rollup-plugin-svelte/blob/master/index.js#L101, and am wondering if they could be possibly refactored to support a browser environment as well.I'm currently exploring ways of compiling Svelte programs in the browser and am eager to learn the best way to make this happen.