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.

Add support for jsconfig and baseUrl

See original GitHub issue

First, this is a really helpful tool, thank you for making it.

I have a file structure that looks something like:

src/
-- presentation/
---- client.js
---- api.js

api is imported by client.js using an absolute import from the src directory: import * as api from '/presentation/api.js'

However, this is not picked up by unimported, I get the following output:

Unresolved import:
presentation/api.js

Unimported files:
src/presentation/api.js

In my jsconfig, I set the root to src, like so:

{
  "compilerOptions": {
    "baseUrl": "src"
  },
  "include": ["src"]
}

to enable the absolute imports.

Do you know how to make this work?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
theahuracommented, Jul 28, 2021

Unfortunately probably not. I added it to my todo list in case I have some free time, but I don’t expect to have much free time to really dig in for at least a month. Still, interested in tracking the feature.

0reactions
smeijercommented, Sep 24, 2021

@anonrig have you tried adding an alias for components?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using baseUrl in jsconfig.json is not working with Next.js
Since Next.js 9.4, Next.js automatically supports the tsconfig.json and ... Create file jsconfig.json in the root folder and add this:
Read more >
Add baseUrl and paths in tsconfig.json and jsconfig.json #5645
This will help VSCode and other IDE to resolve path in TypeScript & JavaScript.
Read more >
jsconfig.json Reference - Visual Studio Code
View the reference for jsconfig.json. ... Visual Studio Code's JavaScript support can run in two different modes: File Scope - no jsconfig.json: In...
Read more >
React JS imports made easy with Absolute paths using ...
React JS imports made easy with Absolute paths using jsconfig.json · Add jsconfig.json file in the root of your project (next to /index.js...
Read more >
jsconfig.json baseUrl is not supported : WEB-43061 - YouTrack
Current solution is to mark desired directories as "resource root". My main issue here is that all projects have either tsconfig.json or jsconfig.json,...
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