conversational-form: Cannot create new cf.EventDispatcher() when loading with ES6 Module Bundler

Hi, I am trying to replicate the voice examples on your website. I am loading conversational-form using Webpack on my project with import cf from 'conversational-form'. When I try to instantiate a new cf.EventDispatcher() I get the following error __WEBPACK_IMPORTED_MODULE_0_conversational_form___default.a.EventDispatcher is not a constructor. I’m kind of a newbie in using Webpack as a module bundler so I might be missing some steps, but I’d say the error occurs because the EventDispatcher class is not exported and thus not importable with Webpack. Thanks in advance for your help 😃 Jordi

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 21 (11 by maintainers)

Commits related to this issue

Most upvoted comments

@rafafotes, unfortunately, you will have to wait until 1.0 is released which will hopefully happen sometime next month.

Hi @edlgg. We have had a bit of a delay on rolling out v1.0.0 where this issue is fixed. I hope it will be released in the next 4 weeks. I’m sorry for the delay.

problem is, export function exports cf.ConversationalForm, not cf

Hi @jorditarrida. I’m not exactly sure if you hit a bug or what the problem might be. Let me have a look in the coming days and report back.