Wade
CDCloudflare Developers
•Created by Wade on 1/21/2024 in #workers-help
Target node environment when building with wrangler
I'm trying to use
@mapbox/mapbox-sdk
in my worker, however they have a browser entry point defined in their package.json which relies on window.XMLHttpRequest
object being present, which causes the following error
Is it possible to either polyfill window.XMLHttpRequest
, or target a node environment when bundling via wrangler?2 replies