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
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:
Details:
......./node_modules/aws-rum-web/node_modules/web-vitals/attribution.js:18
export * from './dist/web-vitals.attribution.js';
^^^^^^
SyntaxError: Unexpected token 'export'
> 1 | import { AwsRum, AwsRumConfig } from 'aws-rum-web';
| ^
2 |
3 | export let rum: AwsRum;
4 |
at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1728:14)
at Object.<anonymous> (node_modules/aws-rum-web/dist/cjs/plugins/event-plugins/WebVitalsPlugin.js:20:21)
at Object.<anonymous> (node_modules/aws-rum-web/dist/cjs/orchestration/Orchestration.js:44:25)
at Object.<anonymous> (node_modules/aws-rum-web/dist/cjs/index.js:18:23)
at Object.<anonymous> (src/config/rumConfig.ts:1:1)
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 v1.14.1...v1.15.0#diff-7f9eb043b568ee17c6e1abb8ce54754a6f6a1571604e94509f756b5a751a6e1c with the import from
webvitals/attribution
. Where just importing fromwebvitals
works,webvitals/attribution
does not.The text was updated successfully, but these errors were encountered: