It's common to setup Webpack aliases to make imports much more convenient, but then you lose the ability to navigate and autocomplete paths in VS Code. This lesson shows you how to create a jsconfig.json with proper paths so you can get back to using VS Code in all its glory.

webpack.config.js:

module.exports  = {
resolve: {
alias: {
components: path.resolve(__dirname, "app/client/src/components")
}
}
}

jsconfig.js:

{
"compilerOptions": {
"baseUrl": ".",
"path": {
"*": ["app/client/src/*"] // match the same name folder in src
}
}
}

[Tools] Support VS Code Navigation and Autocomplete Based on Webpack Aliases with jsconfig.json的更多相关文章

  1. 码云push时提示 DeployKey does not support push code fatal: Could not read from remote repository.

    一.如果需要push代码到码云,需要创建个人公钥,公共公钥只可以读不可以修改 二.执行代码即可:git push

  2. [Webpack 2] Add Code Coverage to tests in a Webpack project

    How much of your code runs during unit testing is an extremely valuable metric to track. Utilizing c ...

  3. win10下visual studio code安装及mingw C/C++编译器配置,launch.json和task.json文件的配置

    快一年了,我竟然还有脸回来..... 过去一年,由于毕设.找工作的原因,发生太多变故,所以一直没更(最主要的原因还是毅力不够...),至于发生了什么事,以后想说的时候再更吧..依然是小白,下面说正事. ...

  4. 使用 Reactjs + Mobx + React-Router 开发项目时 VSCode 编辑器报警 TS 相关的问题(提示experimentalDecorators )

    vscode 对于 JS support 的支持需要配置,在项目根目录下创建一个 jsconfig.json 文件,把以下内容贴入后保存,重启项目即可生效(去掉提示). { "compile ...

  5. Top 40 Static Code Analysis Tools

    https://www.softwaretestinghelp.com/tools/top-40-static-code-analysis-tools/ In this article, I have ...

  6. The Ultimate List of Open Source Static Code Analysis Security Tools

    https://www.checkmarx.com/2014/11/13/the-ultimate-list-of-open-source-static-code-analysis-security- ...

  7. PatentTips - Method and Apparatus to Support Virtualization with Code Patches

    BACKGROUND As recognized in Revision 2.0 of the Intel® Virtualization Technology Specification for t ...

  8. 10 Code Coverage Tools for C & C++

    Code coverage is a measure used in software testing that describes the degree to which the source co ...

  9. Code First配合Entity Framework Power Tools Beta 4使用

    基于现有数据库生成POCO数据类和数据库上下文需要借助Visual Studio一个扩展插件-- Entity Framework Power Tools(一个Code First反向工程工具).只要 ...

随机推荐

  1. python的request抓https的警告问题

    1.在使用requests前加入:requests.packages.urllib3.disable_warnings()2.为requests添加verify=False参数,比如:r = requ ...

  2. Three Garlands~Educational Codeforces Round 35

    C. Three Garlands time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  3. 转:Android 的进程与线程总结

    当一个Android应用程序组件启动时候,如果此时这个程序的其他组件没有正在运行,那么系统会为这个程序 以单一线程的形式启动一个新的Linux 进程. 默认情况下,同一应用程序下的所有组件都运行再相同 ...

  4. YYH的王国(NOIP模拟赛Round 6)

    题目描述 YYH拥有一个有n个城市的国家,编号为1~n.其中城市i到城市j的路径长度为i和j的最小公倍数.现在YYH想建一些高速公路,使得任意两座城市都能通过高速公路直接或间接到达.建造一条高速公路的 ...

  5. 开车旅行(NOIP2012)

    原题传送门 这道坑爹题调了我2小时233~ 首先这道题可以用set,平衡树,双向链表等一堆非(sang)常(xin)简(bing)单(kuang)的算法搞出对于任何一个高度h[i]的前2名和后2名 然 ...

  6. github单独现在一个文件夹

    项目地址:https://github.com/src-kun/webshell/但根据需要只想下载其中一个文件夹https://github.com/src-kun/webshell/tree/ma ...

  7. 通过hover修改其他元素

    hover,我们都知道,是监听组件“悬停状态”的一个伪类. 我们一般通过hover来修改组件的背景什么的,很少涉及到太复杂的操作.也就是说我们一般只是对加了hover伪类的元素自身的样式进行改变,比如 ...

  8. FileInputStream读取文件&FileOutputStream写入文件

    概念摘自:http://jingyan.baidu.com/article/5552ef473ab5f2518ffbc98e.html Java的流式输入输出建立在4个抽象类的基础上:InputStr ...

  9. This template requires a more recent version of the Android Eclipse plugin. Please update from versi

    新建android project的时候遇到这个错误: 解决方法:①直接修改F:\JAVA\SDK\android-sdk\tools\templates\activities (对应你的JAVA S ...

  10. array数据初始化

    #include <iostream> int main() { ]={}; std::cout<<array[]<<]; } 试了试上面的代码发现,数组在用{}赋 ...