-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrollup.config.js
35 lines (34 loc) · 1004 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
import typescript from "rollup-plugin-typescript2";
import {terser} from "rollup-plugin-terser";
import nodeResolve from '@rollup/plugin-node-resolve';
export default [{
external: ["three"],
input: ["./src/main.ts"],
output: [
{
file: "build/three-googly-eyes.js",
format: "iife",
name: "GooglyEyes", // the global which can be used in a browser
globals: { "three": "THREE" }
},
{
file: "build/three-googly-eyes.min.js",
format: "iife",
name: "GooglyEyes", // the global which can be used in a browser
plugins: [terser()],
globals: { "three": "THREE" }
},
{
file: "build/three-googly-eyes.module.js",
format: "es",
}
],
plugins: [
typescript({
useTsconfigDeclarationDir: true,
sourceMap: true,
inlineSources: true,
}),
nodeResolve()
]
}];