-
Notifications
You must be signed in to change notification settings - Fork 11
/
rollup.config.mjs
47 lines (46 loc) · 912 Bytes
/
rollup.config.mjs
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
import terser from '@rollup/plugin-terser';
import { babel } from '@rollup/plugin-babel';
export default {
input: './es/index.js',
output: [
{
dir: './dist',
name: 'emailjs',
format: 'iife',
exports: 'named',
entryFileNames: 'email.min.js',
compact: true,
plugins: [
terser({
mangle: true,
}),
],
},
{
dir: './dist',
name: 'emailjs',
format: 'iife',
exports: 'named',
entryFileNames: 'email.js',
compact: false,
},
],
external: [/^core-js/],
plugins: [
babel({
babelHelpers: 'bundled',
exclude: /node_modules/,
presets: [
[
'@babel/preset-env',
{
modules: false,
targets: '> 0.25%, not dead',
useBuiltIns: 'usage',
corejs: '3',
},
],
],
}),
],
};