Vscode: Auto import changed to dynamic import in JS ES6+

Created on 13 Oct 2018  路  6Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.28.1
  • OS Version: macOS Mojave

When I try to let vscode auto-import a js module, it imports the module in dynamic import syntax.

For example Query from the react-apollo module.

Before:

import { Query } from 'react-apollo

Now:

import('react-apollo').Query

Steps to Reproduce:

  1. Open a .js file
  2. Let vscode auto-import a js module


Does this issue occur when all extensions are disabled?: Yes

*duplicate javascript typescript

Most helpful comment

This issue is getting on my nerve! Is there a way to disabled it in the setting?

All 6 comments

This issue is getting on my nerve! Is there a way to disabled it in the setting?

Confirmed as occurring in Windows 10 with version 1.28.1 and agree with @tiaaaa123 This is horrible behavior and needs some method to tell VSCode to use ES6 imports again.

Version: 1.28.1 (user setup)
Commit: 3368db6750222d319c851f6d90eb619d886e08f5
Date: 2018-10-11T18:13:53.910Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Is there any temporary solution while it's being fixed? I have to import everything manually now. Very frustrating

I have the same problem here, after the last update (versions 1.28 and 1.28.1) it stopped working
I tried using some extensions to do the job, but it conflicts with vscode import

I am using the OS Ubuntu 16.04

Also have this problem.

VSCode 1.28.0

I use auto-imports constantly so this is a real workflow breaker.

Duplicate of #60216

Already fixed in insiders and we're looking into backporting a fix to a 1.28.2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

biij5698 picture biij5698  路  3Comments

villiv picture villiv  路  3Comments

curtw picture curtw  路  3Comments

mrkiley picture mrkiley  路  3Comments

philipgiuliani picture philipgiuliani  路  3Comments