-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.ts
37 lines (36 loc) · 1.09 KB
/
rollup.config.ts
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
26
27
28
29
30
31
32
33
34
35
36
37
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import sourceMaps from "rollup-plugin-sourcemaps";
import typescript from "rollup-plugin-typescript2";
import { terser } from "rollup-plugin-terser";
export default {
input: "src/index.ts",
output: [
{ file: "dist/index.umd.js", format: "umd", sourcemap: true },
{ file: "dist/index.esm.js", format: "es", sourcemap: true },
],
watch: {
include: 'src/**',
},
plugins: [
typescript({
useTsconfigDeclarationDir: true,
abortOnError: true,
tsconfigOverride: {
compilerOptions: {
declaration: true,
}
}
}),
commonjs(),
resolve(),
terser(),
sourceMaps()
],
onwarn(warning, next) {
const isKnownIssue =
/node_modules\/template-colors-web\/dist-npm\/StyledString\.js ->/.test(warning.message)
|| /eval\("require"\)/.test(warning.frame);
if (!isKnownIssue) next(warning);
},
};