Skip to content

Commit 5eb243b

Browse files
Soc Siengsocsieng
authored andcommitted
feat: add es5 build output
fixes #60
1 parent 03736c0 commit 5eb243b

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

rollup.config.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,31 @@ export default [
5353
external: ['react'],
5454
plugins: [rollupJson(), typescript()],
5555
},
56+
{
57+
input: 'src/button-react/index.ts',
58+
output: [
59+
{
60+
file: 'src/button-react/dist/index.es5.min.js',
61+
format: 'umd',
62+
name: 'GooglePayButton',
63+
globals: {
64+
react: 'React',
65+
},
66+
plugins: [terser()],
67+
},
68+
],
69+
external: ['react'],
70+
plugins: [
71+
rollupJson(),
72+
typescript({
73+
tsconfigOverride: {
74+
compilerOptions: {
75+
target: 'es5',
76+
},
77+
},
78+
}),
79+
],
80+
},
5681
{
5782
input: 'src/button-react/index.ts',
5883
output: {
@@ -90,6 +115,27 @@ export default [
90115
],
91116
plugins: [rollupJson(), typescript()],
92117
},
118+
{
119+
input: 'src/button-element/index.ts',
120+
output: [
121+
{
122+
file: 'src/button-element/dist/index.es5.min.js',
123+
format: 'umd',
124+
name: 'GooglePayButton',
125+
plugins: [terser()],
126+
},
127+
],
128+
plugins: [
129+
rollupJson(),
130+
typescript({
131+
tsconfigOverride: {
132+
compilerOptions: {
133+
target: 'es5',
134+
},
135+
},
136+
}),
137+
],
138+
},
93139
{
94140
input: 'src/button-element/index.ts',
95141
output: {

0 commit comments

Comments
 (0)