diff --git a/.changeset/tall-colts-breathe.md b/.changeset/tall-colts-breathe.md new file mode 100644 index 000000000..0e088efeb --- /dev/null +++ b/.changeset/tall-colts-breathe.md @@ -0,0 +1,5 @@ +--- +'@segment/analytics-consent-wrapper-onetrust': patch +--- + +Change tsconfig compile target from ESNext->ES2020 diff --git a/packages/consent/consent-tools/tsconfig.json b/packages/consent/consent-tools/tsconfig.json index 1af879200..302ac0687 100644 --- a/packages/consent/consent-tools/tsconfig.json +++ b/packages/consent/consent-tools/tsconfig.json @@ -6,6 +6,7 @@ "target": "ES2020", // don't down-compile *too much* -- if users are using webpack, they can always transpile this library themselves "lib": ["ES2020", "DOM", "DOM.Iterable"], // assume that consumers will be polyfilling at least down to es2020 "moduleResolution": "node", - "resolveJsonModule": true + "resolveJsonModule": true, + "isolatedModules": true // ensure we are friendly to build systems } } diff --git a/packages/consent/consent-wrapper-onetrust/tsconfig.json b/packages/consent/consent-wrapper-onetrust/tsconfig.json index 2773eacef..963a8bc52 100644 --- a/packages/consent/consent-wrapper-onetrust/tsconfig.json +++ b/packages/consent/consent-wrapper-onetrust/tsconfig.json @@ -3,7 +3,7 @@ "exclude": ["node_modules", "dist"], "compilerOptions": { "module": "ESNext", // es6 modules - "target": "ESNext", // assume that consumers will be using webpack, so don't down-compile + "target": "ES2020", // don't down-compile *too much* -- if users are using webpack, they can always transpile this library themselves "lib": ["ES2020", "DOM", "DOM.Iterable"], // assume that consumers will be polyfilling at least down to es2020 "moduleResolution": "node", "isolatedModules": true // ensure we are friendly to build systems