-
Notifications
You must be signed in to change notification settings - Fork 56
/
rollup.config.configurator.js
60 lines (58 loc) · 1.31 KB
/
rollup.config.configurator.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
import resolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import copy from 'rollup-plugin-copy';
export default [
{
input: 'configurator/playground-configurator.js',
output: {
file: 'configurator/deploy/playground-configurator.js',
format: 'esm',
},
plugins: [
resolve(),
terser({
warnings: true,
ecma: 2017,
compress: {
unsafe: true,
passes: 2,
},
output: {
comments: 'some',
},
mangle: {
properties: false,
},
}),
copy({
targets: [
{
src: 'configurator/index.html',
dest: 'configurator/deploy/',
},
{
src: 'configurator/project',
dest: 'configurator/deploy/',
},
{
src: 'playground-typescript-worker.js',
dest: 'configurator/deploy/',
},
{
src: 'playground-service-worker.js',
dest: 'configurator/deploy/',
},
{
src: 'playground-service-worker-proxy.html',
dest: 'configurator/deploy/',
},
],
}),
],
},
];