-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathrollup.config.js
More file actions
20 lines (18 loc) · 618 Bytes
/
rollup.config.js
File metadata and controls
20 lines (18 loc) · 618 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { getBabelOutputPlugin } from '@rollup/plugin-babel';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
const dev = process.env.ROLLUP_WATCH;
export default {
input: 'ts/main.ts',
output: {
file: 'custom_components/lock_code_manager/www/lock-code-manager-strategy.js',
format: 'es'
},
plugins: [
nodeResolve(),
typescript(),
getBabelOutputPlugin({ presets: ['@babel/preset-env'] }),
!dev && terser({ format: { comments: false } })
]
};