mswjs / source

Generate MSW request handlers from various sources (HAR files, OpenAPI documents, etc).
https://source.mswjs.io
134 stars 5 forks source link

Become ESM-friendly #31

Closed kettanaito closed 3 months ago

kettanaito commented 1 year ago

This package needs to ship in an ESM-friendly format, much like MSW does in the upcoming 2.0 version.

kettanaito commented 1 year ago

The library does build into ESM bundle right now but I don't suppose it has correct exports and stuff. Needs re-checking.

weyert commented 1 year ago

I hope you aren't planning to drop CJS support?

kettanaito commented 1 year ago

@weyert, no, I'm not dropping the CJS support for any MSW libraries at the moment. It will be a CJS+ESM hybrid just like the upcoming version of MSW. It's a bit tedious to pull off from the maintenance perspective but it's worth the compatibility. Given that MSW is a devtool, some of the dual packaging concerns can be ignored.

kettanaito commented 3 months ago

Done in #39.