giniedp / spritespin

jQuery plugin for spriteanimation.
http://giniedp.github.com/spritespin/
MIT License
377 stars 122 forks source link

Error import Spriterspin #74

Open phpiando opened 4 years ago

phpiando commented 4 years ago

I am trying to use Spriterspin in a new project, however, I am having the following error: https://prnt.sc/se819d

My Code is:

<template>
  <f7-page name="home">        
    <f7-block strong>
      <p>Here2 is your blank Framework7 app. Let's see what we have here.</p>
    </f7-block>
  </f7-page>
</template>
<script>
  import $ from "jquery"
  import * as SpriteSpin from "spritespin"

  export default {
    data() {
      return {        

      }
    },
    mounted() { 
      console.log(SpriteSpin)
    }
  }
</script>
giniedp commented 4 years ago

How do you compile that? Do you use webpack? if so, you probably need something like https://webpack.js.org/plugins/provide-plugin/#usage-jquery Otherwise you must ensure that jquery is globally available as jQuery or as $