From ff0d37444918f853dfd2a30daf65db9579a390b8 Mon Sep 17 00:00:00 2001 From: Joe Bell <7349341+joe-bell@users.noreply.github.com> Date: Sun, 2 Apr 2023 11:20:22 +0700 Subject: [PATCH] fix: amend entry points --- packages/class-variance-authority/package.json | 11 +++++++---- packages/cva/package.json | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/class-variance-authority/package.json b/packages/class-variance-authority/package.json index 442793c..7503a46 100644 --- a/packages/class-variance-authority/package.json +++ b/packages/class-variance-authority/package.json @@ -20,19 +20,22 @@ "funding": "https://joebell.co.uk", "author": "Joe Bell (https://joebell.co.uk)", "exports": { - "import": "./dist/index.esm.js", - "require": "./dist/index.cjs.js" + "import": "./dist/index.mjs", + "require": "./dist/index.js" }, + "main": "dist/index.js", + "module": "dist/index.mjs", "types": "./dist/index.d.ts", "files": [ + "dist/*.mjs", "dist/*.js", "dist/*.js.map", "dist/*.d.ts" ], "scripts": { "build": "run-p build:**", - "build:cjs": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.cjs.js -C module.type=commonjs", - "build:esm": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.esm.js -C module.type=es6 ", + "build:cjs": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.js -C module.type=commonjs", + "build:esm": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.mjs -C module.type=es6 ", "build:tsc": "tsc --project .config/tsconfig.build.json", "check": "tsc --project tsconfig.json --noEmit", "dev": "jest --config .config/jest.config.ts --watch", diff --git a/packages/cva/package.json b/packages/cva/package.json index 38187a5..4601d8d 100644 --- a/packages/cva/package.json +++ b/packages/cva/package.json @@ -20,19 +20,22 @@ "funding": "https://joebell.co.uk", "author": "Joe Bell (https://joebell.co.uk)", "exports": { - "import": "./dist/index.esm.js", - "require": "./dist/index.cjs.js" + "import": "./dist/index.mjs", + "require": "./dist/index.js" }, + "main": "dist/index.js", + "module": "dist/index.mjs", "types": "./dist/index.d.ts", "files": [ + "dist/*.mjs", "dist/*.js", "dist/*.js.map", "dist/*.d.ts" ], "scripts": { "build": "run-p build:**", - "build:cjs": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.cjs.js -C module.type=commonjs", - "build:esm": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.esm.js -C module.type=es6 ", + "build:cjs": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.js -C module.type=commonjs", + "build:esm": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.mjs -C module.type=es6 ", "build:tsc": "tsc --project .config/tsconfig.build.json", "check": "tsc --project tsconfig.json --noEmit", "dev": "jest --config .config/jest.config.ts --watch",