|
12 | 12 | "sdk",
|
13 | 13 | "bindings"
|
14 | 14 | ],
|
15 |
| - "main": "lib/index.js", |
| 15 | + "exports": { |
| 16 | + "require": "./lib/cjs/index.js", |
| 17 | + "import": "./lib/esm/index.js" |
| 18 | + }, |
| 19 | + "main": "./lib/cjs/index.js", |
16 | 20 | "types": "lib/index.d.ts",
|
17 | 21 | "files": [
|
18 | 22 | "lib",
|
|
23 | 27 | "scripts": {
|
24 | 28 | "test": "jest",
|
25 | 29 | "test:junit": "jest --ci --reporters=default --reporters=jest-junit",
|
26 |
| - "build": "rimraf lib/* && tsc && mv lib/src/* lib && rimraf lib/package.json lib/src lib/*.test.*", |
| 30 | + "clean": "rimraf lib/*", |
| 31 | + "rb": "rollup -c --configPlugin typescript", |
| 32 | + "rbw": "yarn rb --watch", |
| 33 | + "build": "yarn clean && yarn rb", |
27 | 34 | "lint": "tslint -p tsconfig.json 'src/**/*.ts*'",
|
28 | 35 | "lint:all": "npm run lint",
|
29 | 36 | "check-typescript": "tsc",
|
|
38 | 45 | },
|
39 | 46 | "homepage": "https://github.com/launchdarkly/react-client-sdk",
|
40 | 47 | "devDependencies": {
|
| 48 | + "@rollup/plugin-json": "^6.0.0", |
| 49 | + "@rollup/plugin-node-resolve": "^15.1.0", |
| 50 | + "@rollup/plugin-terser": "^0.4.3", |
| 51 | + "@rollup/plugin-typescript": "^11.1.2", |
41 | 52 | "@testing-library/jest-dom": "^5.16.4",
|
42 | 53 | "@testing-library/react": "^13.0.1",
|
43 | 54 | "@types/hoist-non-react-statics": "^3.3.1",
|
|
47 | 58 | "@types/react": "^18.0.3",
|
48 | 59 | "@types/react-dom": "^18.0.0",
|
49 | 60 | "@types/react-test-renderer": "^18.0.0",
|
| 61 | + "esbuild": "^0.18.11", |
50 | 62 | "jest": "^27.4.4",
|
51 | 63 | "jest-environment-jsdom": "^27.4.4",
|
52 | 64 | "jest-environment-jsdom-global": "^3.0.0",
|
|
57 | 69 | "react-dom": "^18.0.0",
|
58 | 70 | "react-test-renderer": "^18.0.0",
|
59 | 71 | "rimraf": "^3.0.0",
|
| 72 | + "rollup": "^3.26.2", |
| 73 | + "rollup-plugin-dts": "^5.3.0", |
| 74 | + "rollup-plugin-esbuild": "^5.0.0", |
| 75 | + "rollup-plugin-filesize": "^10.0.0", |
60 | 76 | "ts-jest": "^27.1.1",
|
61 | 77 | "tslint": "^6.1.3",
|
62 | 78 | "tslint-config-prettier": "^1.18.0",
|
|
0 commit comments