Skip to content

Commit

Permalink
feat: include umd modules in npm packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Soc Sieng committed Jun 16, 2020
1 parent c6ddb0a commit 48582dd
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion rollup.config.js
Expand Up @@ -28,6 +28,19 @@ export default [
external: ['react'],
plugins: [rollupJson(), typescript()],
},
{
input: 'src/button-react/index.ts',
output: {
file: 'src/button-react/dist/index.umd.js',
format: 'umd',
name: 'GooglePayButton',
globals: {
react: 'React',
},
},
external: ['react'],
plugins: [rollupJson(), typescript()],
},
{
input: 'src/button-react/index.ts',
output: {
Expand All @@ -42,7 +55,16 @@ export default [
output: {
file: 'src/button-element/dist/index.js',
format: 'es',
name: 'google-pay-button',
name: 'GooglePayButton',
},
plugins: [rollupJson(), typescript()],
},
{
input: 'src/button-element/index.ts',
output: {
file: 'src/button-element/dist/index.umd.js',
format: 'umd',
name: 'GooglePayButton',
},
plugins: [rollupJson(), typescript()],
},
Expand Down

0 comments on commit 48582dd

Please sign in to comment.