|
1 | 1 | { |
2 | 2 | "name": "graphql-codegen-typescript-validation-schema", |
| 3 | + "type": "module", |
3 | 4 | "version": "0.15.0", |
4 | 5 | "packageManager": "[email protected]", |
5 | 6 | "description": "GraphQL Code Generator plugin to generate form validation schema from your GraphQL schema", |
|
28 | 29 | ], |
29 | 30 | "exports": { |
30 | 31 | ".": { |
31 | | - "types": "./dist/types/index.d.ts", |
32 | | - "import": "./dist/module/index.js", |
33 | | - "require": "./dist/main/index.js" |
34 | | - } |
| 32 | + "import": { |
| 33 | + "types": "./dist/types/index.d.ts", |
| 34 | + "default": "./dist/esm/index.js" |
| 35 | + }, |
| 36 | + "require": { |
| 37 | + "types": "./dist/types/index.d.ts", |
| 38 | + "default": "./dist/cjs/index.js" |
| 39 | + }, |
| 40 | + "default": { |
| 41 | + "types": "./dist/types/index.d.ts", |
| 42 | + "default": "./dist/esm/index.js" |
| 43 | + } |
| 44 | + }, |
| 45 | + "./package.json": "./package.json" |
35 | 46 | }, |
36 | | - "main": "dist/main/index.js", |
| 47 | + "main": "dist/cjs/index.js", |
| 48 | + "module": "dist/esm/index.js", |
37 | 49 | "typings": "dist/types/index.d.ts", |
38 | | - "module": "dist/module/index.js", |
| 50 | + "typescript": { |
| 51 | + "definition": "dist/types/index.d.ts" |
| 52 | + }, |
39 | 53 | "files": [ |
40 | 54 | "!dist/**/*.tsbuildinfo", |
41 | 55 | "LICENSE", |
|
50 | 64 | "type-check:valibot": "tsc --strict --skipLibCheck --noEmit example/valibot/schemas.ts", |
51 | 65 | "test": "vitest run", |
52 | 66 | "build": "run-p build:*", |
53 | | - "build:main": "tsc -p tsconfig.main.json", |
54 | | - "build:module": "tsc -p tsconfig.module.json", |
| 67 | + "build:cjs": "tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json", |
| 68 | + "build:esm": "tsc -p tsconfig.esm.json && echo '{\"type\":\"module\"}' > dist/esm/package.json", |
55 | 69 | "build:types": "tsc -p tsconfig.types.json", |
56 | 70 | "lint": "eslint .", |
57 | 71 | "lint-fix": "eslint . --fix", |
58 | 72 | "generate": "run-p build:* && graphql-codegen", |
| 73 | + "generate:esm": "run-p build:* && graphql-codegen-esm", |
59 | 74 | "prepublish": "run-p build:*" |
60 | 75 | }, |
61 | 76 | "peerDependencies": { |
|
0 commit comments