admin管理员组文章数量:1302267
When writing a code that will be later pushed through webpack, it is possible to use custom loaders for non-standard files. In effect it is possible to write
import image from './assets/image.png';
and it will be properly handled. The problem is VSCode doesn't provide autopletion for files like .png
, .svg
, .scss
and so on.
Is it possible to do so by some settings or an extension?
When writing a code that will be later pushed through webpack, it is possible to use custom loaders for non-standard files. In effect it is possible to write
import image from './assets/image.png';
and it will be properly handled. The problem is VSCode doesn't provide autopletion for files like .png
, .svg
, .scss
and so on.
Is it possible to do so by some settings or an extension?
Share asked Nov 16, 2017 at 15:26 lortlort 1,45712 silver badges16 bronze badges1 Answer
Reset to default 10I was able to fix it using Path Autoplete extension. By default it does not include file extensions and suggests the .js files in addition to the default suggestions by VS Code. It can be changed by adding the following lines to the User Settings:
"path-autoplete.extensionOnImport": true,
"path-autoplete.excludedItems": {
"**/*.js": {"when": "**"}
}
本文标签: javascriptVSCode import path intellisense for custom files extensionsStack Overflow
版权声明:本文标题:javascript - VSCode import path intellisense for custom files extensions - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741688076a2392563.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论