-
Notifications
You must be signed in to change notification settings - Fork 93
/
rollup.config.ts
49 lines (47 loc) · 1.06 KB
/
rollup.config.ts
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
/*!
* Copyright (c) 2017-present Cliqz GmbH. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import resolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
export default [
{
input: './dist/src/adblocker.js',
output: {
file: './dist/adblocker.umd.min.js',
format: 'umd',
name: 'adblocker',
sourcemap: true,
},
plugins: [
resolve(),
terser({
output: {
comments: false,
},
}),
],
},
{
input: './dist/src/adblocker.js',
output: [
{
dir: './dist/esm',
format: 'esm',
preserveModules: true,
entryFileNames: '[name].js',
sourcemap: true,
},
{
dir: './dist/cjs',
format: 'cjs',
preserveModules: true,
entryFileNames: '[name].cjs',
sourcemap: true,
},
],
},
];