Cannot use citation-js
with the Parcel bundler it seems because citation-js defines it's own version of require
To demonstrate the problem, run npm start
You then see this error in the console
Uncaught TypeError: Cannot read property 'system_id' of undefined
at engines.js:15
at CSL.Blob.<anonymous> (engines.js:34)
at CSL.Output.Queue.string (citeproc_commonjs.js:5262)
at CSL.Output.Queue.string (citeproc_commonjs.js:5159)
at CSL.Engine.CSL.getBibliographyEntries (citeproc_commonjs.js:8528)
at CSL.Engine.makeBibliography (citeproc_commonjs.js:8239)
at bibliography (bibliography.js:42)
at format (output.js:30)
at Cite.format (get.js:18)
at Object.parcelRequire.index.js.citation-js (index.js:5)
If instead, you just load the index.html
file without bundling, the library works