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
fix: ensure that pg-cloudflare can be used with bundlers that don't know about Cloudflare sockets (brianc#2978)
By implementing package.json `exports` we can avoid processing the Cloudflare
specific code, which contains `import ... from "cloudflare:sockets"`, in bundlers such
as Webpack.
If you are bundling for a Worker environment using Webpack then you need to add the
`workerd` condition and ignore `cloudflare:sockets` imports:
**webpack.config.js**
```js
resolve: { conditionNames: ["require", "node", "workerd"] },
plugins: [
new webpack.IgnorePlugin({
resourceRegExp: /^cloudflare:sockets$/,
}),
],
```
0 commit comments