text: import nodeResolve from "@rollup/plugin-node-resolve";
  import sourcemaps from "rollup-plugin-sourcemaps";
  
  const script = "nkisi-client";
  const namespace = "nkisi";
  
  const main = {
    input: "./lib/main/index.js",
    output: {
      file: `./dist/main/${script}.js`,
      name: namespace,
      format: "umd",
      globals: {
        "@nkisi/util": "nkisi",
        "@nkisi/codec": "nkisi",
        "@nkisi/mapping": "nkisi",
        "@nkisi/collections": "nkisi",
        "@nkisi/structure": "nkisi",
        "@nkisi/streamlet": "nkisi",
        "@nkisi/dataflow": "nkisi",
        "@nkisi/recon": "nkisi",
        "@nkisi/uri": "nkisi",
        "@nkisi/warp": "nkisi",
        ws: "ws",
      },
      sourcemap: true,
      interop: false,
      extend: true,
    },
    external: [
      "@nkisi/util",
      "@nkisi/codec",
      "@nkisi/mapping",
      "@nkisi/collections",
      "@nkisi/structure",
      "@nkisi/streamlet",
      "@nkisi/dataflow",
      "@nkisi/recon",
      "@nkisi/uri",
      "@nkisi/warp",
      "ws",
    ],
    plugins: [
      nodeResolve({moduleDirectories: ["../..", "../../../nkisi-core-js", "node_modules"]}),
      sourcemaps(),
    ],
    onwarn(warning, warn) {
      if (warning.code === "CIRCULAR_DEPENDENCY") return;
      warn(warning);
    },
  };
  
  const test = {
    input: "./lib/test/index.js",
    output: {
      file: `./dist/test/${script}-test.js`,
      name: `${namespace}.test`,
      format: "umd",
      globals: {
        http: "http",
        ws: "ws",
      },
      sourcemap: true,
      interop: false,
      extend: true,
    },
    external: [
      "http",
      "ws",
    ],
    plugins: [
      nodeResolve({moduleDirectories: ["../..", "../../../nkisi-core-js", "node_modules"]}),
      sourcemaps(),
    ],
    onwarn(warning, warn) {
      if (warning.code === "CIRCULAR_DEPENDENCY") return;
      if (warning.code === "MISSING_NODE_BUILTINS") return;
      warn(warning);
    },
  };
  
  const targets = [main, test];
  targets.main = main;
  targets.test = test;
  export default targets;
  