Y
Y
YbeysaHelp2020-02-10 14:46:25
webstorm
YbeysaHelp, 2020-02-10 14:46:25

Why doesn't webstorm understand component imports via @ in vue?

5e414266ecb7b363704482.jpeg
Webstorm doesn't understand component imports via @ what should I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
YbeysaHelp, 2020-02-10
@YbeysaHelp

If you are on nuxt.js, then create your own config and specify it in the webstorm settings.

const path = require('path')

module.exports = {
  resolve: {
    extensions: ['.js', '.json', '.vue', '.ts'],
    root: path.resolve(__dirname),
    alias: {
      '@': path.resolve(__dirname),
      '~': path.resolve(__dirname),
    },
  },
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question