Skip to content

Commit

Permalink
update package.json and cjs entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayub-Begimkulov committed Mar 14, 2021
1 parent 837da65 commit 3bd4f7f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"name": "tiny-use-debounce",
"version": "1.0.0",
"description": "React hooks for debouncing and throttling.",
"main": "dist/index.js",
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"sideEffects": false,
"license": "MIT",
"author": "Ayub Begimkulov",
"scripts": {
Expand Down Expand Up @@ -34,12 +35,24 @@
"react": ">=16.8.0 || 17.x",
"react-dom": ">=16.8.0 || 17.x"
},
"keywords": [
"use-debounce",
"use-throttle",
"tiny-use-debounce",
"debounce",
"throttle",
"react-hooks",
"react"
],
"repository": {
"type": "git",
"url": "https://github.com/Ayub-Begimkulov/tiny-use-debounce"
},
"bugs": {
"url": "https://github.com/Ayub-Begimkulov/tiny-use-debounce/issues"
},
"homepage": "https://github.com/Ayub-Begimkulov/tiny-use-debounce#readme"
"homepage": "https://github.com/Ayub-Begimkulov/tiny-use-debounce#readme",
"files": [
"dist"
]
}
7 changes: 7 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ const createRollupConfig = ({ modern }) => {
format: "es",
file: path.resolve(distDir, modern ? "index.js" : "index.ie11.js"),
},
{
format: "cjs",
file: path.resolve(
distDir,
modern ? "index.cjs.js" : "index.cjs.ie11.js"
),
},
],
};
};
Expand Down

0 comments on commit 3bd4f7f

Please sign in to comment.