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. saltstack 实现系统初始化

    1.整体结构如下 [root@zabbix init]# pwd /srv/salt/base/init [root@zabbix init]# ll total -rw-r--r-- root ro ...

  2. Mysql建立触发器

    DELIMITER $$ CREATE /*!50017 DEFINER = 'root'@'%' */ TRIGGER `AddTransferAccountLog` AFTER INSERT ON ...

  3. BS4爬取豆瓣电影

    爬取豆瓣top250部电影 ####创建表: #connect.py from sqlalchemy import create_engine # HOSTNAME='localhost' # POR ...

  4. 嵌入式Linux支持LCD console【转】

    转自:http://blog.sina.com.cn/s/blog_664c545f0100v9zl.html 转载:http://www.mculee.cn/post/48.html [1]LCD ...

  5. Vplayer服务配置-手机播放局域网视频

    如何使用 UPnP DLNA Cedric Fung 2012-08-03 如何使用 UPnP DLNA · Cedric Fung · 2012-08-03 UPnP / DLNA 通用即插即用 ( ...

  6. Selenium2+python自动化7-xpath定位【转载】

    前言 在上一篇简单的介绍了用工具查看目标元素的xpath地址,工具查看比较死板,不够灵活,有时候直接复制粘贴会定位不到.这个时候就需要自己手动的去写xpath了,这一篇详细讲解xpath的一些语法. ...

  7. 【转】玩转Android Camera开发(三):国内首发---使用GLSurfaceView预览Camera 基础拍照demo

    http://blog.csdn.net/yanzi1225627/article/details/33339965 GLSurfaceView是OpenGL中的一个类,也是可以预览Camera的,而 ...

  8. IDEA 提交项目至Git与获取Git项目

    1.IDEA提交项目至git 注:保证已安装Git分布式管理系统,没有自行百度安装git 1)在IDEA中配置Git与GitHub a)Git: File-->Settings --> V ...

  9. Lct浅谈

    Lct浅谈 1.对lct的认识 ​ 首先要知道$lct$是什么.$lct$的全称为$link-cut-tree$.通过全称可以看出,这个数据结构是维护树上的问题,并且是可以支持连边断边操作.$lct$ ...

  10. c# await 到底等待的是什么?

    static void Main(string[] args) { Print(); Console.WriteLine("5 :::" + Thread.CurrentThrea ...