forked from pchen66/panolens.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
38 lines (37 loc) · 927 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
import commonjs from '@rollup/plugin-commonjs';
import inject from '@rollup/plugin-inject';
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
export default {
external: ['three'],
input: 'src/Panolens.js',
output: [
{
format: 'umd',
name: 'PANOLENS',
file: 'build/panolens.js',
indent: '\t',
globals: {three: 'THREE'}
},
{
format: 'es',
file: 'build/panolens.module.js',
indent: '\t'
}
],
plugins: [
resolve(),
commonjs(),
json({
include: 'package.json',
exclude: [ 'node_modules/**' ],
preferConst: true,
indent: '\t',
compact: true,
namedExports: true
}),
inject({
THREE: [ 'three', '*' ]
})
]
};