tern
tern copied to clipboard
Way to define base path for absolute import paths?
I'm using babel module resolver in my js project. All imports are absolute, for example:
import { serveNotFound, serveRedirect } from 'src/lib/response'
How can I configure tern to look up paths starting from a base path above src?
As far as I know there is no such way now. But I think it might be necessary to add this feature. Could you help provide a simple project use this approach I can play with and develop on it?
https://ternjs.net/doc/manual.html#plugin_webpack not doing this?
@albert200000 The webpack plugin loads the webpack config and enhanced resolver to resolve files. Not the babel module resolver.
https://gist.github.com/jeremija/046f9df54000f4059af3ec987d2dfb5f can be used as workaround?