-
Notifications
You must be signed in to change notification settings - Fork 12.8k
"Convert to ES6 module" not working with IIFE pattern #24297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Fixed
A PR has been merged for this issue
Milestone
Comments
@mjbvz , may be you just need to wait a little bit. There is a screenshot with existing "Convert to ES6 module" suggestion for |
(As an aside, could you tell us a bit more about why this IIFE is being used?) |
@DanielRosenwasser I use IIFE for the following two reasons:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
From @osya on May 21, 2018 8:59
Steps to Reproduce:
Click lightbulb and select "Convert to ES6 module" then the 1st
require
transforms to theimport path from "path";
. It is correct. Then comment 1strequire
and click lightbulb and select "Convert to ES6 module" for the 2ndrequire
. 2ndrequire
doesn't converted to theimport path from "path";
. ES6 imports must be at the top level of your JavaScript files. So, I suppose, forrequire
in IIFE there should be NO option "Convert to ES6 module"Copied from original issue: microsoft/vscode#50205
The text was updated successfully, but these errors were encountered: