sites icon indicating copy to clipboard operation
sites copied to clipboard

REPL URI should include compiler options

Open FND opened this issue 6 years ago • 2 comments

As discussed elsewhere, it might be nice if svelte.dev/repl URIs included custom compiler options (e.g. ?generate=ssr) - otherwise sharing samples that rely on such options is a little cumbersome.

FND avatar Apr 29 '19 09:04 FND

FWIW, none of the compiler options will affect the bundled output that is actually run (and thus will not affect the behavior of the component). They only affect what's displayed in the compiled js output box. Having something that doesn't affect the behavior of the REPL example at all encoded in the url might be confusing.

Conduitry avatar Apr 29 '19 12:04 Conduitry

When it comes to sharability, however, people might want to share the difference in the code produced with different options set.

You can imagine a discussion where someone says 'oh look at the code svelte produces with x option' and uses a link to share an example.

pngwn avatar Apr 29 '19 12:04 pngwn