jshttp / cookie

HTTP server cookie parsing and serialization
MIT License
1.36k stars 159 forks source link

Fix exports for some bundlers #166

Closed proudparrot2 closed 1 month ago

proudparrot2 commented 4 months ago

I've been using this package in a javascript library with esbuild and it's worked fine, but for some reason, rspack can't resolve it. Adding "main": "index.js" to package.json fixed this.

wesleytodd commented 4 months ago

While this is a good change and likely to land here, you might want to report that as a bug to them. The default behavior when main is missing is to use index.js: https://nodejs.org/docs/latest/api/modules.html#folders-as-modules