-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.config.js
42 lines (41 loc) · 935 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
31
32
33
34
35
36
37
38
39
40
41
42
import copy from 'rollup-plugin-copy';
import clean from 'postcss-clean';
import buble from '@rollup/plugin-buble';
import normalize from 'postcss-normalize';
import postcss from 'rollup-plugin-postcss';
import { terser } from 'rollup-plugin-terser';
export default [
{
input: 'src/minimap.css',
output: {
file: 'dist/minimap.min.css',
format: 'esm'
},
plugins: [
postcss({
sourceMap: false,
extract: true,
plugins: [normalize, clean]
})
]
},
{
input: 'src/minimap.js',
output: {
file: 'dist/minimap.min.js',
format: 'esm'
},
plugins: [
buble(),
terser(),
copy({
targets: [
{ src: 'src/index.d.ts', dest: 'dist' },
{ src: 'src/images', dest: 'dist' },
{ src: 'src/minimap.js', dest: 'dist' },
{ src: 'src/minimap.css', dest: 'dist' }
]
})
]
}
];