forked from FormidableLabs/react-swipeable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
30 lines (29 loc) · 831 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
import typescript from "@rollup/plugin-typescript";
import pkg from "./package.json";
export default [
// - CommonJS (for Node)
// - ES module (for bundlers)
// - UMD (for browser)
{
input: "src/index.ts",
external: ["react"],
output: [
// NOTE: interop: false is deprecated.
// When we upgrade need to identify best path forward to avoid bloat.
{ file: pkg.main, format: "cjs", sourcemap: true, interop: false },
{ file: pkg.module, format: "es", sourcemap: true },
{
name: "swipeable",
file: pkg.unpkg,
format: "umd",
sourcemap: true,
globals: {
react: 'React'
},
interop: false,
}
],
// ts definition outputs specified in config
plugins: [typescript({ tsconfig: './tsconfig.json' })],
},
];