postalservice14 / vuejs-plugin

[DEPRECATED] Vue.js features for the Intellij Platform (WebStorm, RubyMine, Intellij, etc)
139 stars 20 forks source link

export default at vue component is marked as unused after update #30

Open okjungsoo opened 6 years ago

okjungsoo commented 6 years ago

Hello. I updated Vue plugin to '172.3095.13' version. After than, all 'export default' at component of Vue are marked to unused one. All components have unit test, so they aren't unused one.

Thank you.

screen shot 2017-08-01 at 6 55 34 pm
lusarz commented 6 years ago

:+1:

iloginow commented 6 years ago

Same issue here! And the reason behind this is the fact that the plugin doesn't recognize this import syntax, which is another issue: screenshot_20170831_070905

justclimber commented 6 years ago

same issue. any progress on this?

lucasdcrk commented 6 years ago

Due to Webstorm

pedrofracassi commented 6 years ago

Same issue here.

feryardiant commented 5 years ago

Same issue here

Vue.js plugin 182.3911.9
PhpStorm 2018.2.1
Build #PS-182.3911.43, built on August 8, 2018
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
embryCODE commented 5 years ago

Same problem here. Has anyone found a fix? This is annoying.

colinboe commented 5 years ago

same issue here!! still no solution??

Sitarman commented 5 years ago

Same Here ! Is it just Webstorm or do other IDE have the same issue?

onx2 commented 5 years ago

I changed the reference to the component in my router/index.js from: import ComponentName from '@/components/pages/ComponentName'

to this: import ComponentName from '../components/pages/ComponentName'

And it seems to be working fine. Hope that helps!

wujian-5 commented 5 years ago

I changed the reference to the component in my router/index.js from: import ComponentName from '@/components/pages/ComponentName'

to this: import ComponentName from '../components/pages/ComponentName'

And it seems to be working fine. Hope that helps!

this works

Jlomaka commented 5 years ago

This is not a solution, but a crutch is obtained as for complex projects to make a format ../../../../file/to/path/and/more/level/to/used/ Need Fixed.

moh-slimani commented 5 years ago

just reference /..../projectpath/build/webpack.base.conf.js in Webstorm settings > Languages & Frameworks > JavaScript > Webpack this worked for me

screenshot from 2019-01-04 15-34-03

Quazer commented 5 years ago

I use vue.config.js for this problem:

const path = require('path');

module.exports = {
  configureWebpack: {
    resolve: {
      alias: {
        '~': path.resolve(__dirname, 'src/')
      }
    }
  }
};

And use import as:

import App from './App'
import router from '~/router'
import store from '~/store'

P.S. Don't forget enable File -> Settings -> Languages & Frameworks -> Node.js and NPM: Coding assistance for Node.js

image

And invalidate cache File -> Invalidate caches and restart

alx-khramov commented 5 years ago

This comment advices to tell your IDE where the webpack config is, but I am not able to find the mentioned /build path.

But the solution is mentioned here: https://cli.vuejs.org/guide/webpack.html#using-resolved-config-as-a-file

Some external tools may need access to the resolved webpack config as a file, for example IDEs or command line tools that expect a webpack config path. In that case you can use the following path: <projectRoot>/node_modules/@vue/cli-service/webpack.config.js