|
1 | 1 | { |
2 | 2 | "name": "@launchdarkly/js-client-sdk-common", |
3 | 3 | "version": "1.8.0", |
4 | | - "type": "commonjs", |
5 | | - "main": "./dist/index.js", |
6 | | - "types": "./dist/index.d.ts", |
| 4 | + "type": "module", |
| 5 | + "main": "./dist/index.es.js", |
| 6 | + "types": "./dist/src/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", |
|
18 | 18 | "analytics", |
19 | 19 | "client" |
20 | 20 | ], |
| 21 | + "exports": { |
| 22 | + "types": "./dist/src/index.d.ts", |
| 23 | + "require": "./dist/index.cjs.js", |
| 24 | + "import": "./dist/index.es.js" |
| 25 | + }, |
21 | 26 | "scripts": { |
22 | 27 | "doc": "../../../scripts/build-doc.sh .", |
23 | 28 | "test": "npx jest --ci", |
24 | | - "build": "npx tsc", |
25 | | - "clean": "npx tsc --build --clean", |
| 29 | + "build": "tsc --noEmit && rollup -c rollup.config.js", |
| 30 | + "clean": "rimraf dist", |
26 | 31 | "lint": "npx eslint . --ext .ts", |
27 | 32 | "lint:fix": "yarn run lint -- --fix", |
28 | 33 | "prettier": "prettier --write 'src/*.@(js|ts|tsx|json)'", |
|
33 | 38 | "@launchdarkly/js-sdk-common": "2.9.0" |
34 | 39 | }, |
35 | 40 | "devDependencies": { |
| 41 | + "@rollup/plugin-commonjs": "^25.0.0", |
| 42 | + "@rollup/plugin-json": "^6.1.0", |
| 43 | + "@rollup/plugin-node-resolve": "^15.0.2", |
| 44 | + "@rollup/plugin-terser": "^0.4.3", |
| 45 | + "@rollup/plugin-typescript": "^11.1.1", |
36 | 46 | "@testing-library/dom": "^9.3.1", |
37 | 47 | "@testing-library/jest-dom": "^5.16.5", |
38 | 48 | "@types/jest": "^29.5.3", |
|
51 | 61 | "jest-environment-jsdom": "^29.6.1", |
52 | 62 | "launchdarkly-js-test-helpers": "^2.2.0", |
53 | 63 | "prettier": "^3.0.0", |
| 64 | + "rimraf": "6.0.1", |
| 65 | + "rollup": "^3.23.0", |
54 | 66 | "ts-jest": "^29.1.1", |
55 | 67 | "typedoc": "0.25.0", |
56 | 68 | "typescript": "5.1.6" |
|
0 commit comments