spritespin icon indicating copy to clipboard operation
spritespin copied to clipboard

Error import Spriterspin

Open phpiando opened this issue 4 years ago • 1 comments

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>

phpiando avatar May 10 '20 16:05 phpiando

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 $

giniedp avatar May 10 '20 19:05 giniedp