question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

import with full path

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
greg-dbcommented, 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!

0reactions
jimmywartingcommented, Oct 7, 2020

thx

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to import a Python module given the full path?
This is the easiest way to import a Python module by adding the module path to the path variable. The path variable contains...
Read more >
How can I import a module dynamically given the full path?
The python path can contain zip archives, "eggs" (a complex kind of zip archives), etc. Modules can be imported out of them. So...
Read more >
How to import a Python module given the full ... - Tutorialspoint
The easiest way to import a Python module, given the full path is to add the path to the path variable. The path...
Read more >
How To Import A Module Given The Full Path - Finxter
To import the module to your Python code, you can use the sys.path.append() function to add the directory of the required module to...
Read more >
Understand and Configure Absolute Import Paths in JavaScript
An absolute import path is a path that starts from a root, and you need to define a root first. In a typical...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found