Skip to content

Commit

Permalink
Add UMD build target (react-hook-form#1157)
Browse files Browse the repository at this point in the history
* add UMD build target

* Specify unpkg field in package.json

* Name UMD global as UpperCamelCase

Co-Authored-By: Kotaro Sugawara <[email protected]>

Co-authored-by: Kotaro Sugawara <[email protected]>
  • Loading branch information
kotarella1110 authored Mar 5, 2020
1 parent 5598daa commit a5c13ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"homepage": "https://www.react-hook-form.com",
"author": "<[email protected]>",
"license": "MIT",
"unpkg": "dist/react-hook-form.umd.js",
"devDependencies": {
"@babel/core": "^7.8.6",
"@babel/plugin-transform-runtime": "^7.8.3",
Expand Down
5 changes: 5 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export function getConfig({
file: `dist/${pkg.name}.es.js`,
format: 'esm',
},
{
name: "ReactHookForm",
file: `dist/${pkg.name}.umd.js`,
format: 'umd',
}
],
plugins = [],
} = {}) {
Expand Down

0 comments on commit a5c13ce

Please sign in to comment.