-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrollup.config.ts
More file actions
39 lines (38 loc) · 1.11 KB
/
rollup.config.ts
File metadata and controls
39 lines (38 loc) · 1.11 KB
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
import { defineConfig } from "rollup";
import {
declarationsPlugin,
jsPlugins,
jsPluginsWithTarget,
} from "../../rollup.options";
import pkg from "./package.json" assert { type: "json" };
export default defineConfig([
{
input: "src/index.ts",
output: { file: pkg.module, format: "es" },
plugins: jsPlugins(pkg.version),
external: ["@codspeed/core", /^vitest/],
},
{
input: "src/index.ts",
output: { file: pkg.types, format: "es" },
plugins: declarationsPlugin({ compilerOptions: { composite: false } }),
},
{
input: "src/globalSetup.ts",
output: { file: "dist/globalSetup.mjs", format: "es" },
plugins: jsPlugins(pkg.version),
external: ["@codspeed/core", /^vitest/],
},
{
input: "src/analysis.ts",
output: { file: "dist/analysis.mjs", format: "es" },
plugins: jsPluginsWithTarget(pkg.version, "esnext"),
external: ["@codspeed/core", /^vitest/],
},
{
input: "src/walltime/index.ts",
output: { file: "dist/walltime.mjs", format: "es" },
plugins: jsPluginsWithTarget(pkg.version, "esnext"),
external: ["@codspeed/core", /^vitest/],
},
]);