-
Notifications
You must be signed in to change notification settings - Fork 125
/
rollup.config.js
40 lines (39 loc) · 909 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
import uglify from "rollup-plugin-uglify";
import typescript from "rollup-plugin-typescript";
import sourceMaps from "rollup-plugin-sourcemaps";
export default [
// Compressed (for direct consumption in browser)
// written to dist folder, minified.
{
input: "src/fecha.ts",
output: {
// How it will be exposed on window
name: "fecha",
format: "umd",
file: "dist/fecha.min.js",
exports: "named"
},
plugins: [typescript(), uglify(), sourceMaps()]
},
// For Node: no minify, output in lib dir
{
input: "src/fecha.ts",
output: {
name: "fecha",
format: "umd",
file: "lib/fecha.umd.js",
exports: "named"
},
plugins: [typescript()]
},
{
input: "src/fecha.ts",
output: {
name: "fecha",
format: "esm",
file: "lib/fecha.js",
exports: "named"
},
plugins: [typescript()]
}
];