|
1 | 1 | { |
2 | 2 | "name": "@launchdarkly/js-sdk-common", |
3 | 3 | "version": "2.9.0", |
4 | | - "type": "commonjs", |
5 | | - "main": "./dist/index.js", |
| 4 | + "type": "module", |
| 5 | + "main": "./dist/index.mjs", |
6 | 6 | "types": "./dist/index.d.ts", |
7 | 7 | "homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/shared/common", |
8 | 8 | "repository": { |
|
18 | 18 | "analytics", |
19 | 19 | "client" |
20 | 20 | ], |
| 21 | + "exports": { |
| 22 | + "types": "./dist/index.d.ts", |
| 23 | + "require": "./dist/index.cjs", |
| 24 | + "import": "./dist/index.mjs" |
| 25 | + }, |
21 | 26 | "scripts": { |
22 | 27 | "test": "npx jest --ci", |
23 | | - "build-types": "npx tsc --declaration true --emitDeclarationOnly true --declarationDir dist", |
24 | | - "build": "npx tsc", |
25 | | - "clean": "npx tsc --build --clean", |
| 28 | + "build": "npx tsc --noEmit && rollup -c rollup.config.js", |
| 29 | + "clean": "rimraf dist", |
26 | 30 | "lint": "npx eslint . --ext .ts", |
27 | 31 | "lint:fix": "yarn run lint --fix", |
28 | 32 | "prettier": "prettier --write 'src/*.@(js|ts|tsx|json)'", |
29 | 33 | "check": "yarn && yarn prettier && yarn lint && tsc && yarn test" |
30 | 34 | }, |
31 | 35 | "license": "Apache-2.0", |
32 | 36 | "devDependencies": { |
| 37 | + "@rollup/plugin-commonjs": "^25.0.0", |
| 38 | + "@rollup/plugin-json": "^6.1.0", |
| 39 | + "@rollup/plugin-node-resolve": "^15.0.2", |
| 40 | + "@rollup/plugin-terser": "^0.4.3", |
| 41 | + "@rollup/plugin-typescript": "^11.1.1", |
33 | 42 | "@trivago/prettier-plugin-sort-imports": "^4.1.1", |
34 | 43 | "@types/jest": "^29.4.0", |
35 | 44 | "@typescript-eslint/eslint-plugin": "^6.20.0", |
|
44 | 53 | "jest": "^29.5.0", |
45 | 54 | "launchdarkly-js-test-helpers": "^2.2.0", |
46 | 55 | "prettier": "^3.0.0", |
| 56 | + "rimraf": "6.0.1", |
| 57 | + "rollup": "^3.23.0", |
47 | 58 | "ts-jest": "^29.0.5", |
| 59 | + "tslib": "^2.7.0", |
48 | 60 | "typedoc": "0.25.0", |
49 | 61 | "typescript": "5.1.6" |
50 | 62 | } |
|
0 commit comments