Support for jsconfig.json
See original GitHub issueWhen I create an application with “create react app” then it places all source under the /src directory. In that case, imports do not have a “src/” prefix. However, importjs will produce import paths that do have the “src/” prefix. Is it possible to fix this? Or am I doing something wrong?
I thought that one option could be to take the value of compilerOptions.baseUrl in the jsconfig.json file into account when determining the import paths.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
jsconfig.json Reference - Visual Studio Code
The jsconfig. json file specifies the root files and the options for the features provided by the JavaScript language service.
Read more >What is jsconfig.json? - javascript - Stack Overflow
The jsconfig. json file specifies the root files and the options for the features provided by the JavaScript language service.
Read more >jsconfig.json - npm
Small tool which automatically generates jsconfig.json, used for vscode workspace configuration, with defaults and paths from webpack config ...
Read more >jsconfig.json - GitHub
Small tool which automatically generates jsconfig.json, used for vscode workspace configuration, with some defaults and extracted webpack path aliases.
Read more >Why you need a jsconfig.js when using VSCode - Laravel News
VSCode uses a jsconfig.json file to aid your JavaScript language service and significantly improve your development experience.
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 Free
Top 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

I’ve gotten around it by putting the
package.jsonandnode_modulesin/src, which doesn’t work for create react app…Should be relatively easy to add to here: https://github.com/Galooshi/import-js/blob/master/lib/findProjectRoot.js
If you wanted to start a proposal
FYI, I’m now using the vandelay plugin in VSCode to generate the import statements. It doesn’t have the “Fix all imports” feature that ImportJS has, which is very useful, but otherwise works really well.