Skip to content

Commit

Permalink
build(rollup): 🔧 add unminified umd and reduce peer deps version
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed Sep 30, 2020
1 parent 7ea1db3 commit b04f6d2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"license": "MIT",
"author": "Timeless <[email protected]>",
"main": "dist/lib/index.js",
"unpkg": "dist/renderless-components.production.min.js",
"unpkg": "dist/umd/renderless-components.min.js",
"module": "dist/es/index.js",
"types": "dist/types/index.d.ts",
"files": [
Expand Down Expand Up @@ -133,7 +133,8 @@
"typescript": "4.0.2"
},
"peerDependencies": {
"react": "16.13.1",
"react-dom": "16.13.1"
}
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"main:umd": "dist/umd/renderless-components.js"
}
20 changes: 19 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,25 @@ export default [
input: inputSrc,
output: {
name: "Renderless Components",
file: "dist/renderless-components.production.min.js",
file: "dist/umd/renderless-components.js",
format: "umd",
sourcemap: true,
globals,
},
external,
plugins: [
replace({ "process.env.NODE_ENV": `"production"`, delimiters: ["", ""] }),
resolve(resolveConfig),
babel(babelConfig),
commonJS(),
externalDeps(),
],
},
{
input: inputSrc,
output: {
name: "Renderless Components",
file: "dist/umd/renderless-components.min.js",
format: "umd",
sourcemap: true,
globals,
Expand Down

0 comments on commit b04f6d2

Please sign in to comment.