-
Notifications
You must be signed in to change notification settings - Fork 423
Expand file tree
/
Copy pathrollup.config.js
More file actions
81 lines (79 loc) · 1.59 KB
/
Copy pathrollup.config.js
File metadata and controls
81 lines (79 loc) · 1.59 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import terser from "@rollup/plugin-terser";
const banner = `/*
* Scroller Build Configuration
*
* Scroller
* http://github.com/pbakaus/scroller
*
* Copyright 2011, Zynga Inc.
* Licensed under the MIT License.
* https://raw.github.com/pbakaus/scroller/master/MIT-LICENSE.txt
*/`;
export default [
// ES Module build
{
input: "src/index.js",
output: {
file: "dist/scroller.esm.js",
format: "es",
banner,
},
plugins: [resolve(), commonjs()],
},
// CommonJS build
{
input: "src/index.js",
output: {
file: "dist/scroller.cjs.js",
format: "cjs",
banner,
},
plugins: [resolve(), commonjs()],
},
// UMD build - Core only (Scroller + Animate)
{
input: "src/umd.js",
output: {
file: "dist/scroller.umd.js",
format: "umd",
name: "Scroller",
banner,
},
plugins: [resolve(), commonjs()],
},
// UMD build - Full bundle (Scroller + EasyScroller + Animate)
{
input: "src/umd-full.js",
output: {
file: "dist/scroller-full.umd.js",
format: "umd",
name: "Scroller",
banner,
},
plugins: [resolve(), commonjs()],
},
// UMD minified build - Core only
{
input: "src/umd.js",
output: {
file: "dist/scroller.min.js",
format: "umd",
name: "Scroller",
banner,
},
plugins: [resolve(), commonjs(), terser()],
},
// UMD minified build - Full bundle
{
input: "src/umd-full.js",
output: {
file: "dist/scroller-full.min.js",
format: "umd",
name: "Scroller",
banner,
},
plugins: [resolve(), commonjs(), terser()],
},
];