Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

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

Open
okjungsoo opened this issue Aug 1, 2017 · 15 comments
Open

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

okjungsoo opened this issue Aug 1, 2017 · 15 comments

Comments

@okjungsoo
Copy link

okjungsoo commented Aug 1, 2017

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
Copy link

lusarz commented Aug 23, 2017

👍

@iloginow
Copy link

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
Copy link

same issue. any progress on this?

@lucasdcrk
Copy link

Due to Webstorm

@pedrofracassi
Copy link

Same issue here.

@feryardiant
Copy link

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
Copy link

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

@colinboe
Copy link

same issue here!! still no solution??

@Sitarman
Copy link

Sitarman commented Oct 8, 2018

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

@onx2
Copy link

onx2 commented Oct 24, 2018

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
Copy link

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
Copy link

Jlomaka commented Nov 21, 2018

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.

@slimani-dev
Copy link

slimani-dev commented Jan 4, 2019

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
Copy link

Quazer commented Jan 12, 2019

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests