Skip to content
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

import with full path #258

Closed
jimmywarting opened this issue Mar 9, 2020 · 6 comments · Fixed by #323
Closed

import with full path #258

jimmywarting opened this issue Mar 9, 2020 · 6 comments · Fixed by #323

Comments

@jimmywarting
Copy link

if you are going to allow es6 import/export
than you should really require extensions on your path. node handle it just fine but browsers dose not.

i can't simply just do this in the browser without having to bundle it first

<script type="module">
import dropbox form 'https://cdn.jsdelivr.net/npm/dropbox@4.0.30/es/index.es6.js'
</script>

it tries to load https://cdn.jsdelivr.net/npm/dropbox@4.0.30/es/team/dropbox-team when it should be loading https://cdn.jsdelivr.net/npm/dropbox@4.0.30/es/team/dropbox-team.js

Ryan Dahl regrets the hole package.js and modules resolver.
this is not how browser dose things.

https://youtu.be/M3BM9TB-8yA?t=584

@greg-db
Copy link
Contributor

greg-db commented Mar 9, 2020

Thanks! I'll send this along to the team.

@jimmywarting
Copy link
Author

can gladly make a PR if you like me too

@greg-db
Copy link
Contributor

greg-db commented Mar 9, 2020

We welcome PRs if you wish to contribute them, but I can't promise any particular timeline for reviewing and merging them.

@rogebrd
Copy link
Contributor

rogebrd commented Sep 24, 2020

Hello, Jimmy, we are publishing a new major version of the SDK which will hopefully update a good amount of the legacy logic. If this issue continues to persist beyond this update, please feel free to make a PR and I can review it.

@greg-db
Copy link
Contributor

greg-db commented Oct 7, 2020

@jimmywarting We've updated this in the SDK, so you should now be able to import it like this:

import { Dropbox } from 'https://cdn.jsdelivr.net/npm/dropbox@7.0.0/es/index.js';

Hope this helps!

@jimmywarting
Copy link
Author

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants