Closed maierfelix closed 5 years ago
Thanks for pointing this out!I'll take a look and try to get a fix in ASAP!
ping, hello world
I'm so sorry, I completely forgot about this issue. I'm looking at it right now!
Apparently it was a problem with Webpack's umd
output. This was fixed in 83ce2d5e0affceab31997a4bea9d8d8eb8da8bef by adding
output: {
// ...
globalObject: "typeof self !== 'undefined' ? self : this",
// ...
}
In the webpack config.
I'm using
.mjs
in my node.js project and I import the loader with:But when importing I get the error that
window
is undefined inwebgl-obj-loader.min.js
. I fixed it by replacingwindow
with:typeof window !== "undefined" ? window : global
.I'm not sure if that is the right fix to use this project in node, I can create a PR if it's fine