Code Duplication    Length = 45-47 lines in 2 locations

config/rollup.build.config.js 1 location

@@ 1-47 (lines=47) @@
1
import typescript from "rollup-plugin-typescript2";
2
import del from "rollup-plugin-delete";
3
import { terser } from "rollup-plugin-terser";
4
import banner2 from "rollup-plugin-banner2";
5
6
import pkg from "../package.json";
7
8
export default [
9
  {
10
    input: "src/index.ts",
11
    output: [
12
      {
13
        dir: "playground/src/modular-preview",
14
        format: "cjs",
15
        plugins: [terser()],
16
        strict: false,
17
      },
18
      {
19
        dir: "playground/src/modular-preview",
20
        format: "esm",
21
       // plugins: [terser()],
22
        strict: false,
23
      },
24
      {
25
        dir: pkg.module,
26
        format: "cjs",
27
        strict: false,
28
        plugins: [terser()],
29
      },
30
      {
31
        dir: pkg.module,
32
        format: "esm",
33
       // plugins: [terser()],
34
        strict: false,
35
      },
36
    ],
37
    plugins: [
38
      del({ targets: ["dist/*", "playground/src/modular-preview"] }),
39
      banner2(() => `/* eslint-disable */`),
40
      typescript({
41
        rollupCommonJSResolveHack: false,
42
        clean: true,
43
      }),
44
    ],
45
    external: Object.keys(pkg.peerDependencies || {}),
46
  },
47
];
48

config/rollup.dev.config.js 1 location

@@ 1-45 (lines=45) @@
1
import typescript from "rollup-plugin-typescript2";
2
import { terser } from "rollup-plugin-terser";
3
import banner2 from "rollup-plugin-banner2";
4
5
import pkg from "../package.json";
6
7
export default [
8
  {
9
    input: "src/index.ts",
10
    output: [
11
      {
12
        dir: "playground/src/modular-preview",
13
        format: "cjs",
14
        plugins: [terser()],
15
        strict: false,
16
      },
17
      {
18
        dir: "playground/src/modular-preview",
19
        format: "esm",
20
        // plugins: [terser()],
21
        strict: false,
22
      },
23
      {
24
        dir: pkg.module,
25
        format: "cjs",
26
        strict: false,
27
        plugins: [terser()],
28
      },
29
      {
30
        dir: pkg.module,
31
        format: "esm",
32
        // plugins: [terser()],
33
        strict: false,
34
      },
35
    ],
36
    plugins: [
37
      banner2(() => `/* eslint-disable */`),
38
      typescript({
39
        rollupCommonJSResolveHack: false,
40
        clean: true,
41
      }),
42
    ],
43
    external: Object.keys(pkg.peerDependencies || {}),
44
  },
45
];
46