-
Notifications
You must be signed in to change notification settings - Fork 654
/
rollup.config.js
51 lines (45 loc) · 1.63 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import terser from '@rollup/plugin-terser'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import sizeCheck from 'rollup-plugin-filesize-check'
const opts = { keep_classnames: true, module: true }
export default [
// === Main ==
{
input: 'src/three.js',
output: [{ file: 'builds/compromise.js', format: 'umd', name: 'nlp' }],
plugins: [nodeResolve(), terser(opts), sizeCheck({ expect: 277, warn: 30 })],
},
// === One ==
{
input: 'src/one.js',
output: [{ file: 'builds/one/compromise-one.cjs', format: 'umd', name: 'nlp' }],
plugins: [nodeResolve(), terser(opts), sizeCheck({ expect: 69, warn: 15 })],
},
{
input: 'src/one.js',
output: [{ file: 'builds/one/compromise-one.mjs', format: 'esm' }],
plugins: [nodeResolve(), terser(opts), sizeCheck({ expect: 69, warn: 15 })],
},
// === Two ==
{
input: 'src/two.js',
output: [{ file: 'builds/two/compromise-two.cjs', format: 'umd', name: 'nlp' }],
plugins: [nodeResolve(), terser(opts), sizeCheck({ expect: 226, warn: 30 })],
},
{
input: 'src/two.js',
output: [{ file: 'builds/two/compromise-two.mjs', format: 'esm' }],
plugins: [nodeResolve(), terser(opts), sizeCheck({ expect: 226, warn: 30 })],
},
// === Three ==
{
input: 'src/three.js',
output: [{ file: 'builds/three/compromise-three.cjs', format: 'umd', name: 'nlp' }],
plugins: [nodeResolve(), terser(opts), sizeCheck({ expect: 277, warn: 30 })],
},
{
input: 'src/three.js',
output: [{ file: 'builds/three/compromise-three.mjs', format: 'esm' }],
plugins: [nodeResolve(), terser(opts), sizeCheck({ expect: 277, warn: 30 })],
},
]