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

Does not work with TypeScript #28

Closed
PhouvanhKCSV opened this issue Jan 16, 2018 · 3 comments
Closed

Does not work with TypeScript #28

PhouvanhKCSV opened this issue Jan 16, 2018 · 3 comments

Comments

@PhouvanhKCSV
Copy link

Hi, it is look like vue-flickity does not work when using Vue with TypeScript.

My code is:
import Flickity from 'vue-flickity'

Then i get the following error.
TS2307: Cannot find module 'vue-flickity'.

Does anyone have the error like this, Thank you.

@drewjbartlett
Copy link
Owner

@PhouvanhKCSV I'm not a TS person. Feel free to submit a PR to support this.

@behnamt
Copy link

behnamt commented Jun 1, 2018

For anyone that is still looking for answers:

  • add below to you your @types
declare module '*.vue' {
  import Vue from 'vue';
  export default Vue;
}
  • add vue-loader to your webpack.confg
  • import like this
import Flickity from 'vue-flickity/src/flickity.vue';

@drewjbartlett
Copy link
Owner

@behnamt would you be willing to make a PR to support this with typescript?

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

3 participants