forked from soimy/maxrects-packer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.ts
29 lines (28 loc) · 900 Bytes
/
rollup.config.ts
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
import { ts, dts } from "rollup-plugin-dts";
import uglify from "rollup-plugin-uglify-es";
const config = [
{
input: "./src/index.ts",
// transpiled typescript in umd and es format
output: [
{ file: "dist/maxrects-packer.js", name: "MaxRectsPacker", format: "umd", sourcemap: true },
{ file: "dist/maxrects-packer.mjs", format: "es", sourcemap: true }
],
plugins: [ ts() ]
},
{
input: "./src/index.ts",
// uglified transpiled typescript in commonjs
output: [
{ file: "dist/maxrects-packer.min.js", format: "cjs", sourcemap: false }
],
plugins: [ uglify(), ts() ]
},
{
input: "./src/index.ts",
// bundled `.d.ts` file
output: [{ file: "dist/maxrects-packer.d.ts", format: "es" }],
plugins: [ dts() ]
}
];
export default config;