-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent JavaScript Intellisense / not working #30291
Comments
I had a similar problem #30122 my solution is the following {
"compilerOptions": {
"target": "ES6",
"allowSyntheticDefaultImports": true,
"jsx": "react",
"module": "commonjs",
"baseUrl": ".",
"paths": {
"*": [
"*",
"app/*"
]
}
},
"include": [
"app/**/*.js"
]
} the important bits are Hope this helps 😄 |
@zanza00 , thanks zanza, unfortunately the result was the same (I tested quite a few I created a repo with test files to illustrate the issue (with 2 folders with different There was no difference (this time I tested it on Windows 10) |
@mudrz We don't fully support the proposed I believe you also have to use {
"compilerOptions": {
"target": "ES6",
"allowSyntheticDefaultImports": true,
"jsx": "react",
"module": "commonjs",
"baseUrl": ".",
"paths": {
"App/*": [
"./*"
]
}
},
"include": ["**/*.js"]
} |
@mjbvz , nice, thanks, I wasted so much time on this trying different jsconfig combinations, didn't know that the key also needs to use I tested both configurations and can confirm that Intellisense works in this case (-the export from syntax) {
"compilerOptions": {
"target": "es6",
"baseUrl": ".",
"paths": {
"App/*": ["./*"]
}
},
"exclude": ["dist"]
} |
Steps to Reproduce:
What I am trying to do:
I am using webpack aliases and want to utilize VS Code Intellisense for them
webpack.config.js
ClientApp
Folder structurejsconfig.json
Some functions like
![screen shot 2017-07-08 at 19 15 10](https://user-images.githubusercontent.com/9587050/27987477-0128381c-6417-11e7-8481-fa81beec6a17.png)
deleteProperty
are not recognized if using aliasApp
but are recognized if using relative paths
![screen shot 2017-07-08 at 19 15 45](https://user-images.githubusercontent.com/9587050/27987485-1cde7eae-6417-11e7-8781-21de32d58823.png)
other functions are recognized (in same folder, completely same format used)
![screen shot 2017-07-08 at 19 44 54](https://user-images.githubusercontent.com/9587050/27987498-4da2b32a-6417-11e7-9448-ecf7936458fa.png)
additionally using
![screen shot 2017-07-08 at 19 24 13](https://user-images.githubusercontent.com/9587050/27987577-21544710-6418-11e7-8f03-47a1031e5dea.png)
index.js
with re-exportsdoes not work even with relative paths (
![screen shot 2017-07-08 at 19 19 28](https://user-images.githubusercontent.com/9587050/27987569-065a6c50-6418-11e7-8269-66287614325e.png)
IOptions.js
has a default export object, recognized only in the last format)import { IOptions } from 'App/models';
import { IOptions as IOptions2 } from './models';
![screen shot 2017-07-08 at 19 21 02](https://user-images.githubusercontent.com/9587050/27987573-14aadbfa-6418-11e7-8e57-9bd3b9164435.png)
import IOptions3 from 'App/models/IOptions';
![screen shot 2017-07-08 at 19 21 15](https://user-images.githubusercontent.com/9587050/27987574-199c89ec-6418-11e7-93d3-bb46faab9275.png)
![screen shot 2017-07-08 at 19 21 26](https://user-images.githubusercontent.com/9587050/27987575-1c1a77e2-6418-11e7-91ea-6f66ed6d0a5a.png)
import IOptions4 from './models/IOptions';
Are these configuration issues or?
The text was updated successfully, but these errors were encountered: