|
11 | 11 | "license": "MIT",
|
12 | 12 | "author": "Microsoft and contributors",
|
13 | 13 | "sideEffects": false,
|
14 |
| - "type": "commonjs", |
| 14 | + "type": "module", |
| 15 | + "exports": { |
| 16 | + ".": { |
| 17 | + "import": { |
| 18 | + "types": "./lib/index.d.ts", |
| 19 | + "default": "./lib/index.js" |
| 20 | + }, |
| 21 | + "require": { |
| 22 | + "types": "./dist/index.d.ts", |
| 23 | + "default": "./dist/index.js" |
| 24 | + } |
| 25 | + } |
| 26 | + }, |
15 | 27 | "main": "dist/index.js",
|
16 |
| - "module": "dist/index.js", |
17 | 28 | "types": "dist/index.d.ts",
|
18 | 29 | "scripts": {
|
19 | 30 | "api": "fluid-build . --task api",
|
20 |
| - "api-extractor:commonjs": "api-extractor run --local", |
| 31 | + "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json", |
| 32 | + "api-extractor:esnext": "api-extractor run --local", |
21 | 33 | "build": "fluid-build . --task build",
|
22 | 34 | "build:compile": "fluid-build . --task compile",
|
23 | 35 | "build:docs": "fluid-build . --task api",
|
24 |
| - "check:are-the-types-wrong": "attw --pack", |
| 36 | + "build:esnext": "tsc --project ./tsconfig.json", |
| 37 | + "check:are-the-types-wrong": "attw --pack . --entrypoints .", |
25 | 38 | "check:biome": "biome check .",
|
26 | 39 | "check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
27 | 40 | "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
28 | 41 | "ci:build:docs": "api-extractor run",
|
29 |
| - "clean": "rimraf --glob dist \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp", |
| 42 | + "clean": "rimraf --glob dist \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp lib", |
30 | 43 | "eslint": "eslint --format stylish src",
|
31 | 44 | "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
32 | 45 | "format": "fluid-build --task format .",
|
33 | 46 | "format:biome": "biome check --apply .",
|
34 | 47 | "format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
35 | 48 | "lint": "fluid-build . --task lint",
|
36 | 49 | "lint:fix": "fluid-build . --task eslint:fix --task format",
|
37 |
| - "tsc": "tsc" |
| 50 | + "tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist" |
38 | 51 | },
|
39 | 52 | "dependencies": {
|
40 | 53 | "@fluid-internal/client-utils": "workspace:~",
|
|
62 | 75 | "build:docs": {
|
63 | 76 | "dependsOn": [
|
64 | 77 | "...",
|
65 |
| - "api-extractor:commonjs" |
| 78 | + "api-extractor:commonjs", |
| 79 | + "api-extractor:esnext" |
66 | 80 | ],
|
67 | 81 | "script": false
|
68 | 82 | }
|
|
0 commit comments