-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
39 lines (36 loc) · 909 Bytes
/
rollup.config.js
File metadata and controls
39 lines (36 loc) · 909 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { terser } from "rollup-plugin-terser";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
const input = "node_modules/capitalise-post-town/dist/index.js";
/**
* Whitelist files processed by Babel
*/
const include = ["node_modules/capitalise-post-town/dist/**"];
export default [
/**
* ESM build targeting minimum browser versions that allow [ES6 Modules](https://caniuse.com/#feat=es6-module)
*/
{
input,
output: {
file: "./dist/esm.min.js",
format: "esm",
exports: "named",
},
plugins: [resolve(), commonjs(), terser({})],
},
/**
* UMD build that targets ie11 as base
*/
{
input,
output: {
file: "./dist/umd.min.js",
format: "umd",
name: "IdealPostcodes",
extend: true,
exports: "named",
},
plugins: [resolve(), commonjs(), terser({})],
},
];