diff --git a/package.json b/package.json index fb4557257..db8306ee8 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,12 @@ "bugs": { "url": "https://github.com/MetaMask/utils/issues" }, - "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/MetaMask/utils.git" }, "license": "ISC", + "sideEffects": false, "exports": { ".": { "import": "./dist/index.mjs", @@ -20,6 +20,8 @@ }, "./package.json": "./package.json" }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", "types": "./dist/types/index.d.ts", "files": [ "dist" diff --git a/tsup.config.ts b/tsup.config.ts index 979f8d01f..618e99217 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -28,7 +28,7 @@ export default defineConfig({ // Enables shimming of `__dirname` and `import.meta.url`, so that they work // in both CommonJS and ESM. // https://tsup.egoist.dev/#inject-cjs-and-esm-shims - shims: false, + shims: true, // Hide unnecessary logs from the console. Warnings and errors will still be // shown.