Issues (5)

config/rollup.build.config.js (1 issue)

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