Closed 43081j closed 1 month ago
ugh. for whatever reason, this works in node REPL but not when executing a script
ill keep digging
ok for whatever reason, require && require('foo')
works in webpack, and require != null && require('foo')
doesn't
we could merge this but we should keep a close eye on webpack in future in case they break that too
@alexeyraspopov if we get this over the line, we can publish a new version right?
Anything I can do to help? Would be good to get this moving
@alexeyraspopov I think I can close this since you released a new version
Let me know if it's still a problem though and I'm happy to pick it back up
~Using
globalThis
instead of depending on globals means webpack won't complain at being unable to deal with the dynamic require.~Using a truthiness check seems to solve the problem
Fixes #67
cc @alexeyraspopov maybe we can get a new version published if this lands?