tern_for_sublime
tern_for_sublime copied to clipboard
Doesn't work export default.
My config:
{
"ecmaVersion": 6,
"libs": [
"ecma5",
"ecma6",
"browser",
"react"
],
"dontLoad": [
"**/node_modules/**"
],
"plugins": {
"node": {},
"es_modules": {
"baseUrl": "./"
},
"webpack": {
"configPath": "./build/fake.js"
}
}
}
I couldn't find a clear dependence, but often go to definition does not work when working with export default.
Example:
// app-platform/containers/app/container/index.js
import { connect } from 'react-redux'
import { composeSelectors } from 'app-platform/helpers/selectors'
import * as environment from 'app-platform/selectors/environment'
import * as locale from 'app-platform/selectors/locale'
import App from 'app-platform/components/app/container'
const selector = composeSelectors({
locale: locale.get,
environment: environment.get
})
export default connect(selector)(App)
And this doesnt work
import App from 'app-platform/containers/app/container'
What i do wrong?
After refactoring first file it now work..
Yep, appears to be a bug in ternjs: https://github.com/ternjs/tern/issues/896.