larsgw/citation.js

Vue + citation-js error ReferenceError: regeneratorRuntime is not defined

Closed this issue · 1 comments

I am running a Quasar app (framework built on top of Vue).

this is my function im calling to generate a citation but I get the above error whenever I declare new Cite

 generateCitation() {
      const example = new Cite('Q21972834');

      const output = example.format('bibliography', {
        format: 'html',
        template: 'apa',
        lang: 'en-US',
      });

      console.log(output);
    },

As a note my require statement is at the top of the script.

Here is the actual error message:
Screen Shot 2019-06-21 at 3 05 40 PM

Any ideas what could be going on?

Sorry for the slow response, this seems to have slipped through the cracks. It looks like the new mjs build (which gets used by Webpack) is expecting @babel/polyfill, which isn't there. The next release (v0.4.8) will have a patch in the build process which fixes the error when I try it.