I bundle my project using webpack 5.
So for using the package from within my code I would go for:
var qrGenerator = require("qr2js")
import qrGenerator from "qrjs2"
var qrSvg = qrGenerator.generateSVG(information, options)
Instant error when loading.
Uncaught ReferenceError: nw is not defined
at eval (main.js:6)
at Object../node_modules/qrjs2/main.js ((index):1781)
at __webpack_require__ ((index):2300)
at eval (qrdisplaymodule.js:2)
at Module../toolset/build/js/qrdisplaymodule.js ((index):2126)
at __webpack_require__ ((index):2300)
at eval (allmodules.js:37)
at Module../toolset/build/js/allmodules.js ((index):1942)
at __webpack_require__ ((index):2300)
at eval (index.js:2)
I'm sure it's specifically a bundling issue there.
Maybe there is a quick fix to have this awesome package bundleable this way :-)