Answer the question
In order to leave comments, you need to log in
Module is not installed?
Exactly the same trouble for PhpStorm 2019.1.2
https://intellij-support.jetbrains.com/hc/en-us/co...
Importing the module works correctly, but the storm issues a warning.
Clearing the cache didn't help.
import * as test from '@store/getters'; // warning not installed
module.exports = {
mode: 'development',
entry: [
'./src/app.js',
],
output: {
path: path.resolve(__dirname, '../dist'),
filename: 'main.js',
publicPath: '/',
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
vue: 'vue/dist/vue.js',
config: path.resolve(__dirname, '../config'),
src: path.resolve(__dirname, '../src'),
'@store': path.resolve(__dirname, '../src/store'),
assets: path.resolve(__dirname, '../src/assets'),
components: path.resolve(__dirname, '../src/components'),
'@': path.resolve(__dirname, '../src'),
...
Elena Pogorelova
Created October 03, 2017 04:48 PM
make sure to specify a path to your webpack config in Settings | Languages & Frameworks | JavaScript | webpack. See https://intellij-support.jetbrains.com/hc/en-us/co...
Note also that you have to include file extension in import - https://intellij-support.jetbrains.com/hc/en -us/co...
import {mapGetters, mapActions} from 'vuex';
export default {
name: 'test',
computed: {
...mapGetters({
export declare const mapGetters: Mapper<Computed>
& MapperWithNamespace<Computed>;
export declare const mapActions: Mapper<ActionMethod>
& MapperWithNamespace<ActionMethod>
& FunctionMapper<Dispatch, ActionMethod>
& FunctionMapperWithNamespace<Dispatch, ActionMethod>;
import {mapGetters, mapActions} from 'vuex/types/helpers';
Module not found: Error: Can't resolve 'vuex/types/helpers'
import {mapGetters, mapActions}
but there is for webpack aliases.
Answer the question
In order to leave comments, you need to log in
You have a completely wild section of aliases.
for example
'@': path.resolve(__dirname, '../src'),
'@store': path.resolve(__dirname, '../src/store'),
import some from '@/store/some';
import some from '@store/some';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question