If I have some of my vue components registered globally, how can I make WebStorm to understand it and help me with autocomplete? I have some custom ui components registered globally from main js file like this:
const requireComponent = require.context(
'./components',
true,
/^\.\/ui-kit\/global\/.*ui-.*\.vue$/
)
requireComponent.keys().forEach(function(fileName) {
let baseComponentConfig = requireComponent(fileName)
baseComponentConfig = baseComponentConfig.default || baseComponentConfig
let baseComponentName =
baseComponentConfig.name ||
fileName.replace(/^.+\//, '').replace(/\.\w+$/, '')
Vue.component(baseComponentName, baseComponentConfig)
})
So I want to use such components without any imports. And I can, but the only issue here I haven't any recognition of such components from WS.
WebStorm also marks this tag as
Unknown html tag ui-input
This inspection highlights unknown HTML tags, and lets mark such tags as Custom to avoid highlighting them as unknown in future
Sure if I've imported that component manually, suggestions from WebStorm work fine.
