Skip to content

Commit 47f2e95

Browse files
Harsh Kumar ChoudharyHarsh Kumar Choudhary
authored andcommitted
change: changes build to rollup
1 parent fd1630f commit 47f2e95

12 files changed

+1471
-211
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ lib-cov
99
logs
1010
node_modules
1111
temp
12+
tsconfig.tsbuildinfo

package.json

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,33 @@
3030
"sideEffects": false,
3131
"exports": {
3232
".": {
33-
"types": "./dist/index.d.ts",
34-
"default": "./dist/index.mjs"
33+
"types": "./dist/modules/index.d.ts",
34+
"default": "./dist/index.js"
3535
},
36-
"./min/index.mjs": "./dist/min/index.mjs",
3736
"./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"
4039
},
4140
"./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"
4443
},
4544
"./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"
4847
},
4948
"./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"
5251
},
5352
"./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"
5655
}
5756
},
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",
6160
"typesVersions": {
6261
"*": {
6362
"*": [
@@ -70,7 +69,9 @@
7069
"dist"
7170
],
7271
"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",
7475
"dev": "unbuild --stub",
7576
"lint": "eslint .",
7677
"prepublishOnly": "nr build",
@@ -84,13 +85,18 @@
8485
"@antfu/eslint-config": "^2.6.4",
8586
"@antfu/ni": "^0.21.12",
8687
"@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",
8792
"@types/node": "^20.11.19",
8893
"bumpp": "^9.3.0",
8994
"eslint": "^8.56.0",
9095
"esno": "^4.0.0",
9196
"lint-staged": "^15.2.2",
9297
"pnpm": "^8.15.3",
9398
"rimraf": "^5.0.5",
99+
"rollup": "^4.9.1",
94100
"simple-git-hooks": "^2.9.0",
95101
"typescript": "^5.3.3",
96102
"unbuild": "^2.0.0",

0 commit comments

Comments
 (0)