forked from ubiquity-os/permit-generation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
46 lines (44 loc) · 1.38 KB
/
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
39
40
41
42
43
44
45
46
import typescript from "rollup-plugin-typescript2";
import yaml from "@rollup/plugin-yaml";
import { generateDtsBundle } from "rollup-plugin-dts-bundle-generator";
import nodeResolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import json from "@rollup/plugin-json";
import terser from "@rollup/plugin-terser";
import del from "rollup-plugin-delete";
/** @type {import("rollup").RollupOptions[]} */
const config = [
{
input: "src/types/index.ts",
output: {
dir: "dist/types",
format: "cjs",
},
plugins: [del({ targets: ["dist/*"] }), nodeResolve({ browser: true }), commonjs(), typescript(), yaml(), json(), generateDtsBundle(), terser()],
},
{
input: "src/handlers/index.ts",
output: {
dir: "dist/handlers",
format: "cjs",
},
plugins: [nodeResolve({ browser: true }), commonjs(), typescript(), yaml(), json(), generateDtsBundle(), terser()],
},
{
input: "src/utils/index.ts",
output: {
dir: "dist/utils",
format: "cjs",
},
plugins: [nodeResolve({ browser: true }), commonjs(), typescript(), yaml(), json(), generateDtsBundle(), terser()],
},
{
input: "src/index.ts",
output: {
dir: "dist/core",
format: "cjs",
},
plugins: [nodeResolve(), commonjs(), typescript(), yaml(), json(), generateDtsBundle(), terser()],
},
];
export default config;