sveltejs / sites

Monorepo for the sites in the Svelte ecosystem
https://svelte.dev
MIT License
290 stars 123 forks source link

[REPL] Can't use packages that start with an @ #490

Closed moklick closed 1 year ago

moklick commented 1 year ago

Hey!

It seems that it is not possible to use package names that start with an "@" in the package name. Reproduction REPL: https://svelte.dev/repl/880b7422926642a59a483aaf6c8ccd3e?version=3.59.1

Is this a known issue or is the REPL not made to work with third party packages? I would assume that it's very common to have a package name like this since npm introduced organizations.

Conduitry commented 1 year ago

The issue isn't that the package name begins with @. The error message about Unexpected character '@' refers to the @ inside that package's index.css.

The REPL does support package names beginning with a @, but it does not support importing CSS files as though they were JS files. Because of the REPL's simple nature, I don't think it's likely to support that in the future. There are other solutions out there - like StackBlitz - that give you a complete development environment and build pipeline in a browser.

moklick commented 1 year ago

Got it. Thanks for the info.