|
14 | 14 | }, |
15 | 15 | "license": "MIT", |
16 | 16 | "author": "Laravel", |
| 17 | + "type": "module", |
17 | 18 | "exports": { |
18 | 19 | ".": { |
19 | | - "import": "./dist/index.mjs", |
20 | | - "require": "./dist/index.cjs", |
21 | | - "types": "./dist/index.d.ts" |
| 20 | + "types": "./dist/index.d.ts", |
| 21 | + "default": "./dist/index.js" |
22 | 22 | }, |
23 | 23 | "./inertia-helpers": { |
24 | | - "import": "./inertia-helpers/index.js", |
25 | 24 | "types": "./inertia-helpers/index.d.ts", |
26 | | - "node": "./inertia-helpers/index.js" |
| 25 | + "default": "./inertia-helpers/index.js" |
27 | 26 | } |
28 | 27 | }, |
29 | 28 | "types": "./dist/index.d.ts", |
|
33 | 32 | ], |
34 | 33 | "scripts": { |
35 | 34 | "build": "npm run build-plugin && npm run build-inertia-helpers", |
36 | | - "build-plugin": "rm -rf dist && npm run build-plugin-types && npm run build-plugin-esm && npm run build-plugin-cjs && cp src/dev-server-index.html dist/", |
| 35 | + "build-plugin": "rm -rf dist && npm run build-plugin-types && npm run build-plugin-esm && cp src/dev-server-index.html dist/", |
37 | 36 | "build-plugin-types": "tsc --emitDeclarationOnly", |
38 | | - "build-plugin-cjs": "esbuild src/index.ts --platform=node --format=cjs --outfile=dist/index.cjs --define:import.meta.url=import_meta_url --inject:./import.meta.url-polyfill.js", |
39 | | - "build-plugin-esm": "esbuild src/index.ts --platform=node --format=esm --outfile=dist/index.mjs", |
| 37 | + "build-plugin-esm": "esbuild src/index.ts --platform=node --format=esm --outfile=dist/index.js", |
40 | 38 | "build-inertia-helpers": "rm -rf inertia-helpers && tsc --project tsconfig.inertia-helpers.json", |
41 | 39 | "lint": "eslint --ext .ts ./src ./tests", |
42 | 40 | "test": "vitest run" |
|
0 commit comments