forked from intercom/contentful-typescript-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.ts
30 lines (27 loc) · 895 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
30
import resolve from "rollup-plugin-node-resolve"
import commonjs from "rollup-plugin-commonjs"
import sourceMaps from "rollup-plugin-sourcemaps"
import typescript from "rollup-plugin-typescript2"
import json from "rollup-plugin-json"
const pkg = require("./package.json")
const libraryName = "contentful-typescript-codegen"
export default {
input: `src/${libraryName}.ts`,
output: [{ file: pkg.main, format: "cjs", sourcemap: true, banner: "#!/usr/bin/env node" }],
external: ["prettier", "lodash", "path", "fs", "fs-extra", "meow"],
watch: {
include: "src/**",
},
plugins: [
json(),
typescript({ useTsconfigDeclarationDir: true }),
commonjs({
namedExports: {
"node_modules/prettier/index.js": ["format", "resolveConfig"],
"node_modules/lodash/lodash.js": ["camelCase", "upperFirst"],
},
}),
resolve(),
sourceMaps(),
],
}