Open ckifer opened 8 months ago
Reproduction:
Download this https://codesandbox.io/s/react-jest-typescript-forked-pqh4vx File -> Export to Zip npm install npm test see failure
Solution in jest config:
"transformIgnorePatterns": [
"/node_modules/(?!web-vitals)"
]
Unfortunately this is a breaking change under certain circumstances
Which web client version did you detect this bug with?
v1.15.0
What environment (build systems, module system, and framework) did you detect this bug with?
TypeScript v5.0.2, Webpack v4.46.0, ECMAScript modules (ESM) and React v17.1
Is your web application a single page application (SPA) or multi page application (MPA)?
SPA
Please provide your web client configuration
{ allowCookies: true, endpoint: "https://dataplane.rum.us-west-2.amazonaws.com", guestRoleArn: "arn:aws:iam::000000000000:role/RUM-Monitor-us-west-2-000000000000-00xx-Unauth", identityPoolId: "us-west-2:00000000-0000-0000-0000-000000000000", sessionSampleRate: 1, telemetries: ['errors', 'performance', 'http'] }
Please describe the bug/issue
Previous to v1.15.0 running Jest tests in places that import from
aws-rum-web
worked well, but after upgrading they begin to fail with esm import errors.Important bits:
Issue seems to be here https://github.com/aws-observability/aws-rum-web/compare/v1.14.1...v1.15.0#diff-7f9eb043b568ee17c6e1abb8ce54754a6f6a1571604e94509f756b5a751a6e1c with the import from
webvitals/attribution
. Where just importing fromwebvitals
works,webvitals/attribution
does not.