Set VS Code autoImports action to use ES syntax

Viewed 15

I'm working on a node project in VS Code with a package.json file that has the "type": "module" set. when I type in an export name from another file the autoImport functionality automatically writes the import statement for me; although I would like it to write the import statement using ES modules syntax. currently, it imports it using require which doesn't make much sense since I wrote the export using ES syntax. how do I get VS Code to behave this way?

// example.js

export default function reader() {}

this is how the import works currently auto-import

1 Answers

I use this plugin for auto import. Maybe this plugin will help you too.

Related