-
Notifications
You must be signed in to change notification settings - Fork 3
/
rollup.config.js
38 lines (36 loc) · 1.04 KB
/
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
import merge from "deepmerge";
import commonjs from "@rollup/plugin-commonjs";
import { createBasicConfig } from "@open-wc/building-rollup";
import typescript from "@rollup/plugin-typescript";
import nodePolyfills from "rollup-plugin-polyfill-node";
const baseConfig = createBasicConfig();
export default merge(baseConfig, {
input: "./src/client.ts",
treeshake: true,
output: {
file: "dist/bundle.js",
format: "iife",
dir: undefined,
sourcemap: "inline",
globals: {
fs: "require$$0",
path: "require$$1",
util: "require$$2",
stream: "require$$3",
net: "require$$0$2",
url: "require$$0$3",
crypto: "require$$0$1",
os: "require$$1",
},
},
plugins: [
nodePolyfills({
include: ["stream", "util", "url", "path", "net", "fs", "os", "crypto"],
sourceMap: true,
}),
commonjs(),
typescript({
tsconfig: "./tsconfig.json",
}),
],
});