-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.ts
42 lines (41 loc) · 1.08 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
38
39
40
41
42
import { defineConfig } from "rollup";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import babel from "@rollup/plugin-babel";
import typescript from "@rollup/plugin-typescript";
import eslint from "@rollup/plugin-eslint";
import del from "rollup-plugin-delete";
export default defineConfig({
input: "./src/index.ts",
output: [
{
file: "./dist/index.umd.js",
format: "umd",
name: "_bmaploader",
compact: true,
},
{
file: "./dist/index.js",
format: "es",
compact: true,
},
],
plugins: [
del({ targets: "dist/*" }),
eslint({
include: ["src/**/*.ts"],
throwOnError: true,
throwOnWarning: true,
}),
typescript({
tsconfig: "./tsconfig.json",
}),
resolve(),
commonjs(),
babel({
babelHelpers: "bundled",
exclude: "node_modules/**",
extensions: [".js", ".ts"],
}),
],
});