|
7 | 7 | "gatsby-core-utils"
|
8 | 8 | ],
|
9 | 9 | "exports": {
|
10 |
| - ".": "./dist/index.js", |
11 |
| - "./*": "./dist/*.js", |
12 |
| - "./dist/*": "./dist/*.js" |
| 10 | + ".": { |
| 11 | + "types": "./dist/index.d.ts", |
| 12 | + "import": "./dist/index.mjs", |
| 13 | + "require": "./dist/index.js" |
| 14 | + }, |
| 15 | + "./*": { |
| 16 | + "types": "./dist/*.d.ts", |
| 17 | + "import": "./dist/*.mjs", |
| 18 | + "require": "./dist/*.js" |
| 19 | + }, |
| 20 | + "./dist/*": { |
| 21 | + "types": "./dist/*.d.ts", |
| 22 | + "import": "./dist/*.mjs", |
| 23 | + "require": "./dist/*.js" |
| 24 | + } |
13 | 25 | },
|
14 | 26 | "typesVersions": {
|
15 | 27 | "*": {
|
|
23 | 35 | "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-core-utils#readme",
|
24 | 36 | "license": "MIT",
|
25 | 37 | "main": "dist/index.js",
|
| 38 | + "module": "dist/index.mjs", |
26 | 39 | "types": "dist/index.d.ts",
|
27 | 40 | "repository": {
|
28 | 41 | "type": "git",
|
29 | 42 | "url": "https://github.com/gatsbyjs/gatsby.git",
|
30 | 43 | "directory": "packages/gatsby-core-utils"
|
31 | 44 | },
|
32 | 45 | "scripts": {
|
33 |
| - "build": "babel src --out-dir dist/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\" --extensions \".ts\"", |
| 46 | + "prebuild": "npm-run-all --npm-path npm clean", |
| 47 | + "build": "npm-run-all --npm-path npm -s build:*", |
| 48 | + "build:cjs": "babel src --out-dir dist/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\" --extensions \".ts\"", |
| 49 | + "build:mjs": "cross-env BABEL_ENV=modern babel src --out-dir dist/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\" --extensions \".ts\" --out-file-extension .mjs", |
34 | 50 | "typegen": "tsc --emitDeclarationOnly --declaration --declarationDir dist/",
|
35 | 51 | "prepare": "cross-env NODE_ENV=production npm run build && npm run typegen",
|
36 |
| - "watch": "babel -w src --out-dir dist/ --ignore \"**/__tests__\" --extensions \".ts\"" |
| 52 | + "watch": "npm-run-all --npm-path npm -p watch:*", |
| 53 | + "watch:cjs": "babel -w src --out-dir dist/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\" --extensions \".ts\"", |
| 54 | + "watch:mjs": "cross-env BABEL_ENV=modern babel -w src --out-dir dist/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\" --extensions \".ts\" --out-file-extension .mjs", |
| 55 | + "clean": "del-cli dist/*" |
37 | 56 | },
|
38 | 57 | "bugs": {
|
39 | 58 | "url": "https://github.com/gatsbyjs/gatsby/issues"
|
|
64 | 83 | "@types/ci-info": "2.0.0",
|
65 | 84 | "babel-preset-gatsby-package": "^2.19.0-next.0",
|
66 | 85 | "cross-env": "^7.0.3",
|
| 86 | + "del-cli": "^3.0.1", |
67 | 87 | "is-uuid": "^1.0.2",
|
68 | 88 | "msw": "^0.38.2",
|
| 89 | + "npm-run-all": "^4.1.5", |
69 | 90 | "typescript": "^4.7.2"
|
70 | 91 | },
|
71 | 92 | "engines": {
|
|
0 commit comments