Completed
Push — main ( f53943...11454b )
by Cataldo
02:33
created

config/rollup.dev.config.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 45
Function Count 1

Duplication

Duplicated Lines 45
Ratio 100 %

Importance

Changes 0
Metric Value
wmc 1
eloc 32
mnd 0
bc 0
fnc 1
dl 45
loc 45
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1 View Code Duplication
import typescript from "rollup-plugin-typescript2";
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
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