|
12 | 12 | "bugs": { |
13 | 13 | "url": "https://github.com/apollo-server-integrations/apollo-server-integration-express4/issues" |
14 | 14 | }, |
15 | | - "main": "dist/index.js", |
16 | | - "types": "dist/index.d.ts", |
| 15 | + "type": "module", |
| 16 | + "main": "dist/cjs/index.js", |
| 17 | + "module": "dist/esm/index.js", |
| 18 | + "types": "dist/esm/index.d.ts", |
| 19 | + "exports": { |
| 20 | + ".": { |
| 21 | + "types": { |
| 22 | + "require": "./dist/cjs/index.d.ts", |
| 23 | + "default": "./dist/esm/index.d.ts" |
| 24 | + }, |
| 25 | + "import": "./dist/esm/index.js", |
| 26 | + "require": "./dist/cjs/index.js" |
| 27 | + } |
| 28 | + }, |
17 | 29 | "engines": { |
18 | 30 | "node": ">=20" |
19 | 31 | }, |
20 | 32 | "scripts": { |
21 | | - "build": "tsc --build tsconfig.build.json", |
| 33 | + "compile": "tsc --build tsconfig.build.json", |
| 34 | + "postcompile": "echo '{\"type\":\"module\"}' > dist/esm/package.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json", |
22 | 35 | "clean": "git clean -dfqX", |
23 | | - "prepack": "npm run build", |
| 36 | + "prepack": "npm run compile", |
24 | 37 | "prettier-check": "prettier --check .", |
25 | 38 | "prettier-fix": "prettier --write .", |
26 | | - "changeset-publish": "npm run build && changeset publish", |
| 39 | + "changeset-publish": "npm run compile && changeset publish", |
27 | 40 | "changeset-check": "changeset status --verbose --since=origin/main", |
28 | 41 | "changeset-version": "changeset version && npm i", |
29 | 42 | "spell-check": "cspell lint '**' --no-progress || (echo 'Add any real words to cspell-dict.txt.'; exit 1)", |
|
0 commit comments