-
Notifications
You must be signed in to change notification settings - Fork 77
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: importing 'svelte'
returns undefined
#299
Comments
Taking a peek at this. This is most peculiar - If I run curl.config({ dontAddFileExt: /./ });
curl(['https://bundle.run/svelte']).then(_ => console.log(_)) completely separately from svelte.technology or the REPL, I see the same thing. So it looks like this is an issue with curl.js (or with how packd is bundling svelte?) and not with the REPL. |
Just including a script tag on a page pointing to Edit: Or maybe Svelte's package.json ought to have a |
Huh. This is actually Rollup's fault, in a way, since it's taking the UMD build from the Svelte package and wrapping that in another UMD build, which would work fine except that it's rewriting |
Interesting. What is packd doing exactly when it is asked to deal with a package with no ES |
https://svelte.technology/repl?version=2.6.4&gist=29c93c880013a472c3b079afaa720c2a
The above code works if you download a .zip and run it locally, but in the REPL, after
import svelte from 'svelte'
,svelte
isundefined
. The inner workings of the REPL's module resolution and bundling are a little mysterious to me, but evidently something is getting confused when importing'svelte'
.cc @burningTyger
The text was updated successfully, but these errors were encountered: