-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.ssr.mjs
39 lines (36 loc) · 1.03 KB
/
rollup.config.ssr.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
import typescript from "@rollup/plugin-typescript";
import { dts } from "rollup-plugin-dts";
import pkg from "./package.json" with { type: "json" };
const deps = Object.keys({ ...pkg.dependencies, ...pkg.peerDependencies });
export default [
{
input: "src/ssr/index.tsx",
output: {
name: "ssr",
file: "ssr/index.js",
format: "commonjs",
sourcemap: true,
exports: "named",
},
plugins: [
typescript({
compilerOptions: {
declaration: false,
outDir: "ssr",
rootDirs: ["src/ssr", "src/common"],
rootDir: undefined,
},
include: ["src/common/**/*.(ts|tsx)", "src/ssr/**/*.(ts|tsx)"],
}),
],
external: ["fs", ...deps],
},
{
input: "src/ssr/index.tsx",
output: {
name: "ssr",
file: "ssr/index.d.ts",
},
plugins: [dts()],
},
];