You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be nice to only export the dom module if the user's targeting the browser, similar to how fetch-ponyfill and others do it.
Currently, including the entire package through require('js-utility-belt') on node results in errors because node doesn't have window or document.
From the looks of it, this should be easily done by using the package.json's browser field for lib/index.js and changing the main field for a lib/node.js that strips away the dom export.
The text was updated successfully, but these errors were encountered:
Would be nice to only export the
dom
module if the user's targeting the browser, similar to how fetch-ponyfill and others do it.Currently, including the entire package through
require('js-utility-belt')
on node results in errors because node doesn't havewindow
ordocument
.From the looks of it, this should be easily done by using the package.json's
browser
field forlib/index.js
and changing themain
field for alib/node.js
that strips away thedom
export.The text was updated successfully, but these errors were encountered: