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.

named exports are not resolved relatively

See original GitHub issue

i defined a few named exports

    "namedExports" : {
        "af/util/make" : [ "Make", "hasPrototype", "Mixin"],
        "af/modules/DataBinding/Parser" : ["ObjectParser", "parseExpression", "assignExpression"]
    }

but when I import those functions the paths are not resolved. Lookup path is src, my module is in src/af/modules/DataBinding/StyleBinding.js and I’m importing e.g. Make. The path added by ImportJS is af/util/make and not ../../util/make.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
TitanNanocommented, May 25, 2016

It works great now 👍

0reactions
trotzigcommented, May 24, 2016

Sorry, I forgot about that - thanks for the reminder! I just published atom-import-js@v0.2.2 which includes these changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESM named exports are not available with "type": "module"
I believe the issue is that while NodeJS treats your index.js as an ES module, it doesn't resolve the graphql import to its...
Read more >
How to fix/disable seemingly erroneous "No named exports ...
I believe the report is a false positive because when I run the code, everything works fine and I can indeed import the...
Read more >
Modules • JavaScript for impatient programmers (ES2022 ...
A module can have both named exports and a default export, but it's usually better to stick to one export style per module....
Read more >
Change: Prefer default export to no default export (#20) · Issues
It's possible to sum this up in a fairly simple rule: "Vue single file components have a default export, everything else has named...
Read more >
JavaScript default exports aren't always fun, or how I ...
Named exports are just what they sound like – you export them by name, and can have any ... Objects are not valid...
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