forked from opf/primer_view_components
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
25 lines (24 loc) · 825 Bytes
/
Copy pathrollup.config.js
File metadata and controls
25 lines (24 loc) · 825 Bytes
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
import resolve from "@rollup/plugin-node-resolve"
import typescript from "@rollup/plugin-typescript"
import { terser } from "rollup-plugin-terser"
import pkg from "./package.json"
export default {
input: pkg.module,
output: {
file: pkg.main,
format: "iife",
sourcemap: true
},
plugins: [
resolve(),
// Declarations are emitted by the separate `tsc` step (see script/build-assets),
// so disable them here. Avoids @rollup/plugin-typescript v12 requiring
// declarationDir to sit alongside the bundle output.
typescript({declaration: false, declarationDir: undefined}),
terser({keep_classnames: /Element$/}) // comment out terser in dev if you want debugger statements
],
onwarn: (warning, warn) => {
if (warning.code === "THIS_IS_UNDEFINED") return
warn(warning)
}
}