-
Notifications
You must be signed in to change notification settings - Fork 2
/
rollup.config.js
41 lines (36 loc) · 958 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
31
32
33
34
35
36
37
38
39
40
41
import typescript from "@rollup/plugin-typescript";
const mainConfig = {
input: ["lib/beygla.ts"],
external: [],
output: [
// Names
{ file: `dist/beygla.js`, format: "cjs", exports: "auto" },
{ file: `dist/beygla.esm.js`, format: "es" },
// Addresses
{ file: `dist/addresses.js`, format: "cjs", exports: "auto" },
{ file: `dist/addresses.esm.js`, format: "es" },
],
plugins: [
typescript({
tsconfig: "./tsconfig.declaration.json",
declaration: true,
declarationDir: "../dist-types",
}),
],
};
const strictConfig = {
input: ["lib/strict.ts"],
external: [],
output: [
{ file: `dist/strict.js`, format: "cjs", exports: "auto" },
{ file: `dist/strict.esm.js`, format: "es" },
],
plugins: [
typescript({
tsconfig: "./tsconfig.declaration.json",
declaration: true,
declarationDir: "../dist-types",
}),
],
};
export default [mainConfig, strictConfig];