Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to import #8

Closed
mhpm opened this issue Dec 12, 2018 · 5 comments
Closed

Fail to import #8

mhpm opened this issue Dec 12, 2018 · 5 comments

Comments

@mhpm
Copy link

mhpm commented Dec 12, 2018

image
v

image

always give me this error, please help

image

@svale
Copy link
Member

svale commented Dec 13, 2018

Sorry, I've neglected to update the readme properly.

The correct use from v2 should be to import and initialise in your entry-point file (typically main.js), like so:

import Vue from 'vue'
...
import ImageUploader from 'vue-image-upload-resize'
Vue.use(ImageUploader)
...
new Vue({
  render: h => h(App),
}).$mount('#app')

Then you should be able to use <image-uploader> </image-uploader> in any component.

Does this work?

I'll fix the Readme asap...

@svale
Copy link
Member

svale commented Dec 13, 2018

@mhpm I also put together a quick demo on https://codesandbox.io/s/mqnow97omj Maybe that can be helpful.

Please feel free to re-open if this is not the right solution.

@svale svale closed this as completed Dec 13, 2018
@mhpm
Copy link
Author

mhpm commented Dec 13, 2018

@svale Thank you so much my friend! it already works! that solved my problem!

@mhpm
Copy link
Author

mhpm commented Dec 13, 2018

Please update the README.md on github too! i still see the old version!

@svale
Copy link
Member

svale commented Dec 14, 2018

:-) Done!

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

No branches or pull requests

2 participants