-
Notifications
You must be signed in to change notification settings - Fork 66
/
rollup.config.release.js
65 lines (62 loc) · 1.58 KB
/
rollup.config.release.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import replace from '@rollup/plugin-replace';
const rollup_commonjs = require('@rollup/plugin-commonjs');
const rollup_resolve = require('@rollup/plugin-node-resolve').nodeResolve
const rollup_terser = require('rollup-plugin-terser').terser;
const input = 'ExtPay.dev.js'
export default [
{
input,
output: [{
file: 'dist/ExtPay.js',
format: 'iife',
name: 'ExtPay'
},
{
file: 'sample-extension-mv2/ExtPay.js',
format: 'iife',
name: 'ExtPay'
},
{
file: 'sample-extension-mv3/ExtPay.js',
format: 'iife',
name: 'ExtPay'
}],
plugins: [
replace({
'http://localhost:3000': 'https://extensionpay.com'
}),
rollup_resolve({
browser: true,
}),
rollup_commonjs(),
// rollup_terser(),
]
},
{
input,
output: {
file: 'dist/ExtPay.common.js',
format: 'cjs',
exports: 'default',
},
plugins: [
replace({
'http://localhost:3000': 'https://extensionpay.com'
}),
],
external: ['webextension-polyfill']
},
{
input,
output: {
file: 'dist/ExtPay.module.js',
format: 'es',
},
plugins: [
replace({
'http://localhost:3000': 'https://extensionpay.com'
}),
],
external: ['webextension-polyfill']
}
]