From 526f9484facd5ee88776f697d29c38234bd51aee Mon Sep 17 00:00:00 2001 From: Bartlomiej Obecny Date: Fri, 2 Jul 2021 13:52:03 +0200 Subject: [PATCH] chore: aligning target for esm build with core repo (#557) --- .../src/instrumentation.ts | 2 +- tsconfig.base.esm.json | 2 +- tsconfig.es5.json | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 tsconfig.es5.json diff --git a/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts b/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts index 27712e63cc..95399d6111 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts +++ b/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts @@ -90,7 +90,7 @@ export class DocumentLoadInstrumentation extends InstrumentationBase { * Collects information about performance and creates appropriate spans */ private _collectPerformance() { - const metaElement = [...document.getElementsByTagName('meta')].find( + const metaElement = Array.from(document.getElementsByTagName('meta')).find( e => e.getAttribute('name') === TRACE_PARENT_HEADER ); const entries = getPerformanceNavigationEntries(); diff --git a/tsconfig.base.esm.json b/tsconfig.base.esm.json index 5dbd1afb11..e65651a426 100644 --- a/tsconfig.base.esm.json +++ b/tsconfig.base.esm.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.base.json", + "extends": "./tsconfig.es5.json", "compilerOptions": { "module": "ES6", "moduleResolution": "node" diff --git a/tsconfig.es5.json b/tsconfig.es5.json new file mode 100644 index 0000000000..3c83c51a2b --- /dev/null +++ b/tsconfig.es5.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "target": "es5" + } +}