-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.config.mjs
38 lines (34 loc) · 993 Bytes
/
rollup.config.mjs
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
import { config } from "dotenv";
import dts from "rollup-plugin-dts";
config();
export default [
process.env.reason === "bundling" && {
input: "./build/index.js",
output: {
file: "./bin/index.js",
format: "esm",
},
external: ["chalk", "fs", "path", "readline", "child_process"],
},
process.env.reason === "bundling" && {
input: "./src/types/NextDeployConfig.ts",
output: {
file: "./types/index.d.ts",
format: "es",
},
plugins: [dts()],
},
process.env.reason === "license-comment" && {
input: "./bin/index.js",
output: {
file: "./bin/index.js",
format: "cjs",
banner: `#!/usr/bin/env node
/**
* @kpverse/[email protected] - Next JS Deployment Automation Tool from KPVERSE (https://kpverse.in).
*
* Copyright © Kartavya Patel, KPVERSE - All Rights Reserved.
*/`,
},
},
].filter(Boolean);