Akryum / vue-virtual-scroller

⚡️ Blazing fast scrolling for any amount of data
https://vue-virtual-scroller-demo.netlify.app
9.78k stars 916 forks source link

Installation issue #30

Closed gbezyuk closed 7 years ago

gbezyuk commented 7 years ago

Hi! I'm trying to use this package in my Nuxt-based project. I've tried both local component import and global plugin import. Both are failing with this error:

 ERROR  Failed to compile with 1 errors                                                   11:34:07 AM

 error  in ./~/vue-virtual-scroller/index.js

Module parse failed: ...myproject/frontend/node_modules/vue-virtual-scroller/index.js Unexpected token (1:20)
You may need an appropriate loader to handle this file type.
| export default from './dist/vue-virtual-scroller'
| export * from './dist/vue-virtual-scroller'
| import './dist/vue-virtual-scroller.css'

I've also tried to import a component directly from package's src folder. Then it fails with a similar error, but mentioning vue-observe-visibility package.

What bothers me is that I can't figure out which import exactly is failing, so I can't figure out which loader am I supposed to install. Both vue and style loaders are, obviously, installed. Also, my text editor underlines the first reexporting default line red, so I guess it may be relevant.

Akryum commented 7 years ago

Try importing the distribution files.

Akryum commented 7 years ago

Please try the latest version.