aboutsummaryrefslogtreecommitdiff
path: root/packages/idb-bridge/rollup.config.js
blob: 76214f22dd10add8b1833d54dca8e60003909b41 (plain)
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
// rollup.config.js
import commonjs from "@rollup/plugin-commonjs";
import nodeResolve from "@rollup/plugin-node-resolve";
import json from "@rollup/plugin-json";
import builtins from "builtin-modules";
import pkg from "./package.json";

export default {
  input: "lib/index.js",
  output: {
    file: pkg.main,
    format: "cjs",
    sourcemap: true
  },
  external: builtins,
  plugins: [
    nodeResolve({
      preferBuiltins: true,
    }),

    commonjs({
      include: [/node_modules/],
      extensions: [".js", ".ts"],
      ignoreGlobal: false,
      sourceMap: false,
    }),

    json(),
  ],
}