-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathrollup.config.js
47 lines (45 loc) · 1.01 KB
/
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
43
44
45
46
47
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import {terser} from 'rollup-plugin-terser';
import glsl from 'rollup-plugin-glsl';
const config = (file, plugins = []) => ({
input: 'src/index.js',
output: {
name: 'deck.gl-raster',
format: 'umd',
indent: false,
file,
globals: {
'@deck.gl/core': 'deck',
'@deck.gl/layers': 'deck',
'@deck.gl/mesh-layers': 'deck',
'@luma.gl/core': 'luma',
'@luma.gl/constants': 'luma.GL',
'@luma.gl/engine': 'luma',
'@luma.gl/webgl': 'luma',
},
},
plugins: [
resolve(),
commonjs(),
...plugins,
glsl({
include: 'src/**/*.glsl',
sourceMap: true,
compress: true
}),
],
external: [
'@deck.gl/core',
'@deck.gl/layers',
'@deck.gl/mesh-layers',
'@luma.gl/core',
'@luma.gl/constants',
'@luma.gl/engine',
'@luma.gl/webgl',
],
});
export default [
config('dist/dist.js'),
config('dist/dist.min.js', [terser()]),
];