|
2 | 2 | "name": "@launchdarkly/js-client-sdk-common", |
3 | 3 | "version": "1.9.0", |
4 | 4 | "type": "module", |
5 | | - "main": "./dist/index.mjs", |
6 | | - "types": "./dist/index.d.ts", |
| 5 | + "main": "./dist/esm/index.mjs", |
| 6 | + "types": "./dist/esm/index.d.ts", |
7 | 7 | "homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/shared/sdk-client", |
8 | 8 | "repository": { |
9 | 9 | "type": "git", |
|
19 | 19 | "client" |
20 | 20 | ], |
21 | 21 | "exports": { |
22 | | - "types": "./dist/index.d.ts", |
23 | | - "require": "./dist/index.cjs", |
24 | | - "import": "./dist/index.mjs" |
| 22 | + "require": { |
| 23 | + "types": "./dist/cjs/index.d.ts", |
| 24 | + "default": "./dist/cjs/index.cjs" |
| 25 | + }, |
| 26 | + "import": { |
| 27 | + "types": "./dist/esm/index.d.ts", |
| 28 | + "default": "./dist/esm/index.mjs" |
| 29 | + } |
25 | 30 | }, |
26 | 31 | "scripts": { |
27 | 32 | "doc": "../../../scripts/build-doc.sh .", |
28 | 33 | "test": "npx jest --ci", |
29 | | - "build": "tsc --noEmit && rollup -c rollup.config.js", |
| 34 | + "make-cjs-package-json": "echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json", |
| 35 | + "make-esm-package-json": "echo '{\"type\":\"module\"}' > dist/esm/package.json", |
| 36 | + "make-package-jsons": "npm run make-cjs-package-json && npm run make-esm-package-json", |
| 37 | + "build": "npx tsc --noEmit && rollup -c rollup.config.js && npm run make-package-jsons", |
30 | 38 | "clean": "rimraf dist", |
31 | 39 | "lint": "npx eslint . --ext .ts", |
32 | 40 | "lint:fix": "yarn run lint -- --fix", |
|
0 commit comments