forked from RonenNess/partykals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
47 lines (46 loc) · 961 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
45
46
47
import babel from "@rollup/plugin-babel";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
const DEV = process.env.NODE_ENV === "development";
export default {
input: "./partykals/index.js",
output: [{
file: "./dist/partykals.module.js",
format: "cjs",
sourcemap: false,
name: "partykals",
globals:{
three:"THREE"
}
},{
file: "./dist/partykals.js",
format: "iife",
sourcemap: false,
name: "partykals",
globals:{
three:"THREE"
}
}],
external: ["three"],
plugins: [
resolve({
browser: true
}),
commonjs(),
babel({
exclude: "node_modules/**",
compact: DEV ? "auto" : true,
presets: [
[
"@babel/preset-env",
{
targets: {
browsers: "last 10 versions"
}
}
]
],
extensions: [".js", ".mjs"]
})
]
};