J
J
jeruthadam2017-08-17 23:25:31
JavaScript
jeruthadam, 2017-08-17 23:25:31

What does @ mean in npm module name and how to use them?

I constantly have problems with broken paths when I try to use modules, like npm i @nishanths/zoom.js
Why are they doing this? What is it? How to import them? Webpack builder, vue-loader.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2017-08-18
@jeruthadam

Most likely you have an alias in your webpack like this:

alias: {
      'vue$': 'vue/dist/vue.esm.js',
      '@': resolve('src')
    }

accordingly, when you import such a module, webpack replaces the path with the path from the alias.
The solution is to change the alias.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question