-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
30 lines (29 loc) · 893 Bytes
/
rollup.config.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
import terser from "@rollup/plugin-terser";
const devMode = (process.env.NODE_ENV === 'development');
console.log(`${devMode ? 'development' : 'production'} node bundle`)
export default [
{
input: 'src/index.js',
output: {
file: 'dist/index.js',
format: 'es',
sourcemap:devMode ? 'inline' : false,
plugins: [
terser({
ecma:2020,
mangle:{toplevel:true},
compress: {
module:true,
toplevel:true,
unsafe_arrows:true,
drop_console: !devMode,
drop_debugger: !devMode,
},
output: {
quote_style: 1,
}
})
],
}
}
]