kopiro / siriwave

The Apple® Siri wave-form replicated in a JS library.
http://kopiro.github.io/siriwave/
MIT License
1.63k stars 168 forks source link

Unable to work from a webpack #23

Closed Prithiraj closed 6 years ago

Prithiraj commented 6 years ago

I use Quasar/Vuejs,

The earlier version used to work well but it failed with this version.

import SiriWave from 'siriwave'

 methods: {
    initialized () {
      this.siriWave = new SiriWave({
        container: this.$refs['siri'],
        width: window.innerWidth,
        height: window.innerHeight * 0.12
      })
    }
  },
  mounted () {
    this.initialized()
  }
}

This throws an error telling SiriWave is not a constructor:

[Vue warn]: Error in mounted hook: "TypeError: siriwave__WEBPACK_IMPORTED_MODULE_1___default.a is not a constructor"

and

TypeError: siriwave__WEBPACK_IMPORTED_MODULE_1___default.a is not a constructor

kopiro commented 6 years ago

Hi @Prithiraj, now it should work. Version 1.2.0