From d5c00b69c6dab5e22ce0535b385f6819a4d39e5b Mon Sep 17 00:00:00 2001 From: Hamish Meikle Date: Wed, 17 May 2023 10:33:09 +1000 Subject: [PATCH] Remove `.cjs` output (#32) * Remove cjs output * wip --- package.json | 8 ++++---- rollup.config.js | 6 +----- tsconfig.json | 3 ++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 27fd69b..5101ed9 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,9 @@ { "name": "@authsignal/browser", - "version": "0.1.1", + "version": "0.1.2", + "type": "module", "main": "dist/index.js", - "module": "dist/index.mjs", + "module": "dist/index.js", "types": "dist/index.d.ts", "keywords": [ "authsignal", @@ -48,8 +49,7 @@ ], "exports": { ".": { - "require": "./dist/index.js", - "import": "./dist/index.mjs", + "import": "./dist/index.js", "types": "./dist/index.d.ts" } } diff --git a/rollup.config.js b/rollup.config.js index ad581ea..1a9b71a 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -5,11 +5,7 @@ export default { input: "src/index.ts", output: [ { - dir: "dist", - format: "cjs", - }, - { - file: "dist/index.mjs", + file: "dist/index.js", format: "esm", }, ], diff --git a/tsconfig.json b/tsconfig.json index 957fdb1..e9961db 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,8 @@ "moduleResolution": "node", "esModuleInterop": true, "resolveJsonModule": true, - "preserveWatchOutput": true + "preserveWatchOutput": true, + "rootDir": "src" }, "include": ["./src/**/*.ts"] }