wranglers handling of node module resolutioncustom export conditions
Im trying to use a package in my worker that depends on package export conditions (notably the ‘development’ condition). I was expecting wrangler dev to use the development export condition, but it looks like it doesnt. Is there any way to provide which export conditions wrangler should use?
6 Replies
Not that I'm aware of
It only really looks for
workerd
/browser
conditions iircBundling · Cloudflare Workers docs
By default, Wrangler bundles your Worker code using esbuild . This means that Wrangler has built-in support for importing modules from npm defined in …
And theres no way to configure this in wrangler somehow?
Nope
You could open an issue at https://github.com/cloudflare/workers-sdk/issues and ask them to make it configurable, or add
"development"
to the conditions for wrangler dev
.Thanks, will do