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

Investigate improving webpack support #32108

Closed
mjbvz opened this issue Aug 8, 2017 · 11 comments
Closed

Investigate improving webpack support #32108

mjbvz opened this issue Aug 8, 2017 · 11 comments
Assignees
Labels
feature-request Request for new features or functionality javascript JavaScript support issues
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 8, 2017

Explore how we can improve support for webpack such as help configuring your tsconfig.json file to be in sync with your webpack.config.

@mjbvz mjbvz added javascript JavaScript support issues plan-item VS Code - planned item for upcoming labels Aug 8, 2017
@mjbvz mjbvz self-assigned this Aug 8, 2017
@mjbvz mjbvz added this to the August 2017 milestone Aug 8, 2017
@kieferrm kieferrm changed the title Investigate improving webpack task support Investigate improving webpack support Aug 10, 2017
@kieferrm
Copy link
Member

See #9594 (comment).

@mjbvz mjbvz modified the milestones: September 2017, August 2017 Aug 28, 2017
@mjbvz mjbvz modified the milestones: September 2017, Backlog Sep 25, 2017
@TheLarkInn
Copy link
Member

Hi there!! Sean from webpack. Is this still on your backlog?? I was just thinking about the many ways that this could integrate really well. One thing is our configuration validation schema which stays 100% up to date with webpack, found here: https://github.com/webpack/webpack/blob/master/schemas/webpackOptionsSchema.json

Happy to help hack on this if needed! Feel free and ping me. (If I don't respond here catch me on MS mail or Teams).

@mjbvz
Copy link
Collaborator Author

mjbvz commented Nov 8, 2017

Yes. There are two areas that I think we could improve to start with:

  • Better support for webpack.config.js files. Provide proper intellisense and error reporting when editing one of these. This may be something that we could implement as a TypeScript server plugin or a vscode extension

  • Support for generating/syncing a jsconfig.json from a webpack.config.js. This one may make more sense as a VS Code extension.

Let me know if you have any other ideas as well or are interested in getting started. We should also meet up some time to talk more about this

@mjbvz mjbvz added feature-request Request for new features or functionality and removed plan-item VS Code - planned item for upcoming labels Nov 14, 2017
@adityapurwa
Copy link

Is there any news on this?

@ajhyndman
Copy link

ajhyndman commented Mar 1, 2018

I love the idea of better support for webpack.config.js and jsconfig.js files! But I wanted to throw another idea in the ring, too.

I'm working on a few webpack-based projects now, which I have been able to successfully write jsconfig.js files for. However, I have not been able to get path-completion working working for absolute paths which match my baseUrl and paths configurations.

This also means that symbol discovery and automatic import statement generation works in node_modules packages, but not local source code.

I would be keen to take a look at improving support for this, if it's something VS Code would consider accepting.

Update:

Actually, I just investigated a little further, and I think this might be resolved in the most recent version of Typescript:

microsoft/TypeScript#20525

So maybe my real question is whether it's possible to use a more recent version of typescript myself, or how frequently vscode's typescript dependency gets updated? 😄

@gulshan
Copy link

gulshan commented Mar 1, 2018

@ajhyndman You can use typescript.tsdk settings to use a different version of typescript.

@ajhyndman
Copy link

@gulshan Thanks! I'll give it a shot.

@ajhyndman
Copy link

ajhyndman commented Mar 2, 2018

Okay, I'm not really sure I understand what's going on, anymore.

It looks like, even with the version of typescript that's shipped with VS Code, I can actually get symbol discovery across local source code, if my jsconfig looks like this:

{
  "compilerOptions": {
    "target": "es6",
    "baseUrl": "./src",
    "paths": {
      "*": ["*"]
    }
  },
  "include": [
    "src/**/*"
  ]
}

However, if I have a deeply nested package structure (with import statements that look like import Code from 'folder/below/src.jsx') paths are not resolved unless I use a jsconfig something like this:

{
  "compilerOptions": {
    "target": "es6",
    "baseUrl": "./src",
    "paths": {
      "**/*": ["**/*"]
    }
  },
  "include": [
    "src/**/*"
  ]
}

In this latter case, "jump to definition" functionality works correctly, but symbol discovery does not.

This behaviour appears unchanged in [email protected].

@dnistreanu
Copy link

dnistreanu commented Jul 5, 2018

My opinion is that webpack intellisense is important. I can confirm that it's not working at all.

Version 1.24.1
Commit 24f62626b222e9a8313213fb64b10d741a326288
Date 2018-06-13T17:51:32.889Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

@NaviMarella
Copy link

@TheLarkInn Is there any update on this??

I would love to contribute, in developing an VS Code extension for supporting webpack intellisense. Please provide your ideas on this.

@mjbvz
Copy link
Collaborator Author

mjbvz commented Sep 12, 2018

Closing this exploration. Please open feature requests or bug reports for any specific problems you run into when working with webpack

@mjbvz mjbvz closed this as completed Sep 12, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 27, 2018
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
Projects
None yet
Development

No branches or pull requests

9 participants