forked from 1977474741/spa-custom-hooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
36 lines (36 loc) · 936 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
import { babel } from '@rollup/plugin-babel';
import terser from '@rollup/plugin-terser';
export default {
input: 'lib/spa-custom-hooks/index.js',
output: [
{
name: 'CustomHook',
file: 'lib/spa-custom-hooks.js',
format: 'cjs',
},
{
name: 'CustomHook',
file: 'lib/spa-custom-hooks.mjs',
format: 'es',
},
],
plugins: [
babel({
babelHelpers: 'bundled',
configFile: false,
presets: [
[
'@babel/preset-env',
{
targets: '> 0.1%, last 2 versions, Firefox ESR, not dead',
},
],
],
}),
terser({
compress: {
pure_funcs: ['console.log'],
},
}),
],
};