Questions tagged [vscode-jsconfig]
44 questions
0
votes
0 answers
jsconfig.json does not find absolute import in a VueJS3 project
I have the following jsconfig.json file at the root of my project
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"exclude": [
…

Cyril N.
- 38,875
- 36
- 142
- 243
0
votes
0 answers
vscode ignoring jsconfig.json file
I have just added the jsconfig.json file to my node and react project. It is at the top level of the project.
here is what is in it:
{
"compilerOptions": {
"baseUrl": "./src"
}
}
It is having no effect. I have reload the vscode window. I…

Bear Bile Farming is Torture
- 4,317
- 4
- 27
- 61
0
votes
0 answers
VS Code updateImportsOnFileMove setting works only with JS / TS
Is it possible to instruct VS Code to apply updateImportsOnFileMove setting to all file types, especially to JSON files? Currently I can do it only for JS / TS files and I didn't find anything in VS Code docs or anywhere else about other file…

cincplug
- 1,024
- 5
- 20
- 38
0
votes
0 answers
Adding custom types and adding it in tsconfig.json
I have a custom type definition in types.t.ds in the following folder structure
src
typings
types.t.ds
In the tsconfig.json, I have included it as
"include": ["src/typings/**/*.d.ts"]
My type definition is the following
declare…

jeff
- 910
- 2
- 6
- 25
0
votes
0 answers
Multi-path jsconfig.json does not work when aliases are merged together
Consider this jsconfig.json:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"Form": [
"components/Form/Exports",
],
"OtherForm": [
"Modules/Forms/Exports",
],
}
}
}
I can import from any of…

Big boy
- 1,113
- 2
- 8
- 23
0
votes
2 answers
Passing options to js compiler on meteor
We are adding a jsconfig file to the root of a meteor project to add short hands form imports.
For instance instead of import UserMutations from '../../api/Users/mutations'; we would like to write import UserMutations from…

Laakal
- 657
- 6
- 16
0
votes
0 answers
NextJS module resolution error with multiple paths in my path resolution
Hi everyone :) I was hoping I could get some fresh eyes on a problem I'm running into on my project:
I have a NextJS (12.1.4) project using absolute imports, I also have an NPM package where I directly import the source files in my project (since…

Carwyn Stephen
- 134
- 4
- 23
0
votes
1 answer
"Unable to open: File is a directory" when importing
I'm working on a React project in vscode. I noticed a few days ago that any of my imports that point to a directory with an index.js/jsx file in them cannot be resolved by cmd+clicking on the import or the function name.
I get an error in the bottom…

omid
- 1,146
- 1
- 7
- 17
0
votes
2 answers
VSCode goToDefenition not working when .jsx and .js files of same name in same folder
My structure is:
/Home
/home.js
/Home.jsx
In .jsx I'm trying to use go to defenition feature on path with webpack alias. To resolve webpack aliases I have jsconfig.json with this params:
{
"compilerOptions": {
"target": "es6",
…

1nspir3
- 41
- 3
0
votes
1 answer
VSCode not resolving babel absolute imports correctly for Intellisense
I am losing my mind over this. I have a very simple hello world project that I want to use Babel and ESLint in. I also want to use absolute imports, but vscode is not resolving my absolute imports correctly.
My project structure is:
- node_modules
-…

Ziad Alzarka
- 333
- 1
- 2
- 12
0
votes
0 answers
Can't resolve export default from 'xxxx' in index.js vscode when ctrl/cmd click imports
When i'm cmd clicking on a import it can't go to the definition of the component if i use a unnamed default export. It works when I do a named export.
src/components/Component/Component.js
// When i cmd/ctrl click here it should go to…

Rane
- 255
- 1
- 6
- 17
-1
votes
1 answer
Inconsistent module loading using jsconfig and VSCode
I have been working on a project for months and I have the following jsconfig.json file to make loading paths easier. I don't believe there's anything wrong with this config because it has been working for the entire length of the project, but here…

Jay
- 326
- 2
- 18
-1
votes
1 answer
how do i configure vscode to use my entire workspace for javsascript code suggestions
i'm not using anything like vue or react or node. or any other "compiled" javascript library. i was told that there's some sort of configuration to make it so that vscode will use my entire workspace. the linked me to some docs that don't seem to…

sophia daniels
- 9
- 2
-3
votes
1 answer
Is the jsconfig.json file required to be used in every JavaScript project?
I am working with a JavaScript project. Is it is necessary (or recommended) to use the jsconfig.json file in every JavaScript project?
Will adding the jsconfig.json file make the development process easier, or is it only used for larger JavaScript…

Arnav Thorat
- 3,078
- 3
- 8
- 33