|
30 | 30 | "sideEffects": false,
|
31 | 31 | "exports": {
|
32 | 32 | ".": {
|
33 |
| - "types": "./dist/index.d.ts", |
34 |
| - "default": "./dist/index.mjs" |
| 33 | + "types": "./dist/modules/index.d.ts", |
| 34 | + "default": "./dist/index.js" |
35 | 35 | },
|
36 |
| - "./min/index.mjs": "./dist/min/index.mjs", |
37 | 36 | "./idleQueue.js": {
|
38 |
| - "types": "./dist/idleQueue.d.ts", |
39 |
| - "default": "./dist/idleQueue.mjs" |
| 37 | + "types": "./dist/modules/idleQueue.d.ts", |
| 38 | + "default": "./dist/modules/idleQueue.js" |
40 | 39 | },
|
41 | 40 | "./idleCbWithPolyfill.js": {
|
42 |
| - "types": "./dist/idleCbWithPolyfill.d.ts", |
43 |
| - "default": "./dist/idleCbWithPolyfill.mjs" |
| 41 | + "types": "./dist/modules/idleCbWithPolyfill.d.ts", |
| 42 | + "default": "./dist/modules/idleCbWithPolyfill.js" |
44 | 43 | },
|
45 | 44 | "./idleValue.js": {
|
46 |
| - "types": "./dist/idleValue.d.ts", |
47 |
| - "default": "./dist/idleValue.mjs" |
| 45 | + "types": "./dist/modules/idleValue.d.ts", |
| 46 | + "default": "./dist/modules/idleValue.js" |
48 | 47 | },
|
49 | 48 | "./defineIdleProperty.js": {
|
50 |
| - "types": "./dist/defineIdleProperty.d.ts", |
51 |
| - "default": "./dist/defineIdleProperty.mjs" |
| 49 | + "types": "./dist/modules/defineIdleProperty.d.ts", |
| 50 | + "default": "./dist/modules/defineIdleProperty.js" |
52 | 51 | },
|
53 | 52 | "./defineIdleProperties.js": {
|
54 |
| - "types": "./dist/defineIdleProperties.d.ts", |
55 |
| - "default": "./dist/defineIdleProperties.mjs" |
| 53 | + "types": "./dist/modules/defineIdleProperties.d.ts", |
| 54 | + "default": "./dist/modules/defineIdleProperties.js" |
56 | 55 | }
|
57 | 56 | },
|
58 |
| - "main": "./dist/index.mjs", |
59 |
| - "module": "./dist/index.mjs", |
60 |
| - "types": "./dist/index.d.ts", |
| 57 | + "main": "./dist/index.cjs", |
| 58 | + "module": "./dist/index.js", |
| 59 | + "types": "./dist/modules/index.d.ts", |
61 | 60 | "typesVersions": {
|
62 | 61 | "*": {
|
63 | 62 | "*": [
|
|
70 | 69 | "dist"
|
71 | 70 | ],
|
72 | 71 | "scripts": {
|
73 |
| - "build": "unbuild", |
| 72 | + "build": "rimraf dist && rimraf tsconfig.tsbuildinfo && tsc -b && rollup -c", |
| 73 | + "build:ts": "tsc -b", |
| 74 | + "build:js": "rollup -c", |
74 | 75 | "dev": "unbuild --stub",
|
75 | 76 | "lint": "eslint .",
|
76 | 77 | "prepublishOnly": "nr build",
|
|
84 | 85 | "@antfu/eslint-config": "^2.6.4",
|
85 | 86 | "@antfu/ni": "^0.21.12",
|
86 | 87 | "@antfu/utils": "^0.7.7",
|
| 88 | + "@babel/core": "^7.23.6", |
| 89 | + "@babel/preset-env": "^7.23.6", |
| 90 | + "@rollup/plugin-babel": "^6.0.4", |
| 91 | + "@rollup/plugin-terser": "^0.4.4", |
87 | 92 | "@types/node": "^20.11.19",
|
88 | 93 | "bumpp": "^9.3.0",
|
89 | 94 | "eslint": "^8.56.0",
|
90 | 95 | "esno": "^4.0.0",
|
91 | 96 | "lint-staged": "^15.2.2",
|
92 | 97 | "pnpm": "^8.15.3",
|
93 | 98 | "rimraf": "^5.0.5",
|
| 99 | + "rollup": "^4.9.1", |
94 | 100 | "simple-git-hooks": "^2.9.0",
|
95 | 101 | "typescript": "^5.3.3",
|
96 | 102 | "unbuild": "^2.0.0",
|
|
0 commit comments