diff --git a/javascript/sentry-conventions/attributes.d.ts b/javascript/sentry-conventions/attributes.d.ts new file mode 100644 index 00000000..be53ef7b --- /dev/null +++ b/javascript/sentry-conventions/attributes.d.ts @@ -0,0 +1,3 @@ +// This file is a compatibility shim for TypeScript compilers that do not +// support the package.json `exports` field for resolving subpath exports. +export * from './dist/attributes'; diff --git a/javascript/sentry-conventions/attributes.js b/javascript/sentry-conventions/attributes.js new file mode 100644 index 00000000..833ffe37 --- /dev/null +++ b/javascript/sentry-conventions/attributes.js @@ -0,0 +1,3 @@ +// This file is a compatibility shim for bundlers (e.g. webpack 4) that do not +// support the package.json `exports` field for resolving subpath exports. +module.exports = require('./dist/attributes.cjs'); diff --git a/javascript/sentry-conventions/op.d.ts b/javascript/sentry-conventions/op.d.ts new file mode 100644 index 00000000..b8030bd4 --- /dev/null +++ b/javascript/sentry-conventions/op.d.ts @@ -0,0 +1,3 @@ +// This file is a compatibility shim for TypeScript compilers that do not +// support the package.json `exports` field for resolving subpath exports. +export * from './dist/op'; diff --git a/javascript/sentry-conventions/op.js b/javascript/sentry-conventions/op.js new file mode 100644 index 00000000..0574d4ba --- /dev/null +++ b/javascript/sentry-conventions/op.js @@ -0,0 +1,3 @@ +// This file is a compatibility shim for bundlers (e.g. webpack 4) that do not +// support the package.json `exports` field for resolving subpath exports. +module.exports = require('./dist/op.cjs'); diff --git a/javascript/sentry-conventions/package.json b/javascript/sentry-conventions/package.json index df9a1db4..0410ab88 100644 --- a/javascript/sentry-conventions/package.json +++ b/javascript/sentry-conventions/package.json @@ -31,7 +31,11 @@ "node": ">=14" }, "files": [ - "dist" + "dist", + "attributes.js", + "attributes.d.ts", + "op.js", + "op.d.ts" ], "repository": { "type": "git",