forked from jamonholmgren/mst-async-storage
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrollup.config.ts
More file actions
35 lines (32 loc) · 841 Bytes
/
rollup.config.ts
File metadata and controls
35 lines (32 loc) · 841 Bytes
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
import resolve from "rollup-plugin-node-resolve"
import commonjs from "rollup-plugin-commonjs"
import sourceMaps from "rollup-plugin-sourcemaps"
import camelCase from "lodash.camelcase"
import filesize from "rollup-plugin-filesize"
// @ts-ignore
const pkg = require("./package.json")
const LIBRARY_NAME = pkg.name
const GLOBALS = ["mobx-state-tree", "react-native-keychain", "react-native"]
export default {
input: `build/es/${LIBRARY_NAME}.js`,
external: GLOBALS,
output: [
{
file: pkg.main,
name: camelCase(LIBRARY_NAME),
format: "umd",
sourcemap: true,
globals: GLOBALS,
},
{
file: pkg.module,
format: "es",
sourcemap: true,
globals: GLOBALS,
},
],
watch: {
include: "build/es/**",
},
plugins: [commonjs(), resolve(), sourceMaps(), filesize()],
}