-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
31 lines (30 loc) · 892 Bytes
/
rollup.config.js
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
import {terser} from 'rollup-plugin-terser';
import resolve from '@rollup/plugin-node-resolve';
import commonJS from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel';
import pkg from './package.json';
export default {
input: './src/validator.js',
output: [
{file: pkg.browser, format: 'umd', plugins: [terser()], name: 'constraint-validator'},
{file: pkg.main, format: 'cjs', plugins: [terser()], exports: 'auto'},
{file: pkg.module, format: 'esm', plugins: [terser()]},
],
plugins: [
resolve(),
commonJS({
include: 'node_modules/**'
}),
babel({
presets: ['@babel/env'],
plugins: [
'@babel/plugin-proposal-class-properties'
]
}),
],
external: [
'ipaddr.js',
'locutus',
'luxon',
]
};