-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.config.js
44 lines (43 loc) · 988 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
43
44
import typescript from 'rollup-plugin-typescript2';
import pkg from './package.json';
import {terser} from "rollup-plugin-terser";
export default {
input: 'src/index.ts', // our source file
output: [
{
file: 'build/rl-loadout-lib.min.js',
format: 'umd',
name: 'RL', // the global which can be used in a browser,
globals: {
three: 'three'
}
},
{
file: 'build/rl-loadout-lib.js',
format: 'umd',
name: 'RL', // the global which can be used in a browser,
globals: {
three: 'THREE'
}
}
],
external: [
...Object.keys(pkg.dependencies || {}),
'three'
],
plugins: [
typescript({
typescript: require('typescript'),
tsconfigOverride: {
compilerOptions: {
module: 'es2015',
declaration: false,
declarationMap: false
}
}
}),
terser({
include: [/^.+\.min\.js$/]
}) // minifies generated bundles
]
};