:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
// MSW v2 and its dependencies mark their Node-targeted subpath exports as null under the `browser`
// export condition that Jest's jsdom environment activates, which breaks resolution of `msw/node`
// and transitive deps like `@mswjs/interceptors/ClientRequest`. Resolve just the MSW ecosystem with
// Node conditions; every other package keeps jsdom's default (browser) resolution untouched.
const MSW_ECOSYSTEM =
/^(msw($|\/)|@mswjs\/|@bundled-es-modules\/|@open-draft\/|@inquirer\/|rettime$|strict-event-emitter$|headers-polyfill$|outvariant$|until-async$|is-node-process$)/
module.exports = (request, options) =>
options.defaultResolver(request, {
...options,
conditions: MSW_ECOSYSTEM.test(request) ? ['node', 'require', 'default'] : options.conditions,
})