Skip to content

Commit

Permalink
Merge pull request #143 from 142vip/feat/add-import
Browse files Browse the repository at this point in the history
feat: 统一为各模块增加`exports`配置
  • Loading branch information
微信公众号:储凡 authored Oct 4, 2024
2 parents af2e492 + 278e5a8 commit 0a51a4f
Show file tree
Hide file tree
Showing 15 changed files with 157 additions and 14 deletions.
12 changes: 11 additions & 1 deletion packages/axios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/egg-axios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/egg-grpc-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/egg-mysql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/egg-redis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/egg-sequelize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/egg-swagger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/egg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/nest-redis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/nest-typeorm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/nest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/oauth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion packages/redis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,18 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"*.mjs",
"dist"
],
"scripts": {
Expand Down
14 changes: 14 additions & 0 deletions packages/typeorm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@
"keywords": [
"公众号搜:储凡"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build-test": "unbuild",
"typecheck": "tsc --noEmit"
Expand Down

0 comments on commit 0a51a4f

Please sign in to comment.