Add support for jsconfig and baseUrl
See original GitHub issueFirst, 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:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@anonrig have you tried adding an alias for
components
?