How to config tern for webpack style?


#1

I’m using tern_for_vim, and I see tern has announced to:
“Support webpack config files in the webpack plugin”.

But there is no instruction to tell how to config or how to use. And I haven’t found any form google.

Any one could give me some information?


#2

I wrote webpack plugin, but I don’t know how to add documentation for that.

You can have add webpack config to plugins in your .tern-project, like:

{
  "libs": [],
  "plugins": {
    "webpack": {}
  }
}

It would read config from webpack.config.js file in the same directory, you can add relative configPath if your config file in another directory or not webpack.config.js

{
  "libs": [],
  "plugins": {
    "webpack": {
      "configPath": "../webpack.config.js"
    }
  }
}

#3

That’s done by editing doc/manual.txt and adding a section similar to those for other plugins (say, node_resolve). I’d be grateful if you could do this through a PR! (The website will automatically be updated when I merge such a change.)