Skip to content

Investigate improving webpack support #32108

Closed

Description

@mjbvz

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

Activity

  1. added
    javascript
    plan-item
    on Aug 8, 2017
  2. changed the title [-]Investigate improving webpack task support[/-] [+]Investigate improving webpack support[/+] on Aug 10, 2017
  3. kieferrm commented on Aug 10, 2017

    @kieferrm
    Member
  4. TheLarkInn commented on Nov 7, 2017

    @TheLarkInn
    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).

  5. mjbvz commented on Nov 8, 2017

    @mjbvz
    ContributorAuthor

    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

  6. added
    feature-request
    and removed
    plan-item
    on Nov 14, 2017
  7. adityapurwa commented on Feb 6, 2018

    @adityapurwa

    Is there any news on this?

  8. ajhyndman commented on Mar 1, 2018

    @ajhyndman

    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? 😄

  9. gulshan commented on Mar 1, 2018

    @gulshan

    Andrew Hyndman (@ajhyndman) You can use typescript.tsdk settings to use a different version of typescript.

  10. ajhyndman commented on Mar 2, 2018

    @ajhyndman

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

  11. ajhyndman commented on Mar 2, 2018

    @ajhyndman

    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].

  12. NaviMarella commented on Aug 11, 2018

    @NaviMarella

    Sean Larkin (@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.

  13. mjbvz commented on Sep 12, 2018

    @mjbvz
    ContributorAuthor

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

  14. locked and limited conversation to collaborators on Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestjavascript

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions