Skip to content
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

support js dynamic import #25003

Closed
shjyh opened this issue Apr 19, 2017 · 6 comments
Closed

support js dynamic import #25003

shjyh opened this issue Apr 19, 2017 · 6 comments
Assignees
Labels
feature-request Request for new features or functionality javascript JavaScript support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@shjyh
Copy link

shjyh commented Apr 19, 2017

is support js dynamic import in the plan?

the lastest version of webpack 2 treats import() as a split-point, but the ide give me a syntax error when i use it.

@mjbvz mjbvz self-assigned this Apr 19, 2017
@mjbvz mjbvz added feature-request Request for new features or functionality javascript JavaScript support issues typescript Typescript support issues labels Apr 19, 2017
@sppatel
Copy link

sppatel commented Apr 20, 2017

Same. I get the error "Declaration or statement expected". @shjyh is this what you get?

@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Apr 20, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Apr 20, 2017

Yes, this is currently not supported. microsoft/TypeScript#14495 tracks this issue on the TypeScript side. We use TypeScript to power both our JS and TS language features.

Closing as upstream

@mjbvz mjbvz closed this as completed Apr 20, 2017
@shjyh
Copy link
Author

shjyh commented Apr 21, 2017

yeah @sppatel you are right.
@mjbvz thanks for attention this issue
Although this does not affect webpack to compile, but the syntax error looks very ...you know what I mean... uncomfortable

@varunkumar
Copy link

Is there a way to disable formatting for a file till dynamic import support is added?

@mjbvz
Copy link
Collaborator

mjbvz commented May 3, 2017

@varunkumar Just disable whatever is causing the file to be automatically formatted:

"[typescript]": {
    "editor.formatOnSave": false,
    ...
}

@varunkumar
Copy link

I would want the autoformatting enabled for all files except for the one that uses import().

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality javascript JavaScript support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants