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 badges
Add a ment  | 

1 Answer 1

Reset to default 10

I 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