Skip to content

Commit

Permalink
fix: improve build & types exports for all targets, Node, CJS/ESM (#255)
Browse files Browse the repository at this point in the history
- build only 1 `dist/types` folder for all target
  • Loading branch information
ghiscoding authored Nov 11, 2023
1 parent 2fb7031 commit d64d814
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@
"plugin",
"slickgrid"
],
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "index.d.ts",
"typesVersions": {
">=4.2": {
"*": [
"dist/types/*"
]
}
},
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"node": "./dist/cjs/index.js",
"require": "./dist/cjs/index.js",
"default": "./dist/esm/index.js"
},
"./package.json": "./package.json"
},
"homepage": "https://github.com/ghiscoding/slickgrid-react",
"bugs": {
"url": "https://github.com/ghiscoding/slickgrid-react/issues"
Expand Down Expand Up @@ -36,25 +55,6 @@
"name": "Joel Peña"
}
],
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js",
"default": "./dist/esm/index.js"
},
"./*": "./*"
},
"typesVersions": {
"*": {
"*": [
"./dist/types/index.d.ts"
]
}
},
"types": "dist/types/index.d.ts",
"scripts": {
"build:demo": "webpack --env production",
"delete:dist": "rimraf dist",
Expand Down
6 changes: 2 additions & 4 deletions src/slickgrid-react/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node",
"target": "es2017",
"target": "es2018",
"lib": [
"es2017",
"es2018",
"dom"
],
"typeRoots": [
Expand All @@ -30,9 +30,7 @@
},
"exclude": [
".vscode",
"src/react_project",
"src/examples",
"src/resources",
"src/test",
"**/*.spec.ts",
"**/*.scss"
Expand Down

0 comments on commit d64d814

Please sign in to comment.