-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
35 lines (33 loc) · 929 Bytes
/
rollup.config.mjs
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
import terser from '@rollup/plugin-terser'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import alias from '@rollup/plugin-alias'
import json from '@rollup/plugin-json'
import nodePolyfills from 'rollup-plugin-polyfill-node'
const aliases = alias({
entries: [
{ find: 'crypto', replacement: 'crypto-browserify' }
],
})
export default [
{
input: 'internal/html/static/assets/js/worker.js',
output: {
format: 'es',
file: 'internal/html/static/assets/js/worker.min.js',
name: 'worker',
plugins: [terser()],
},
plugins: [nodeResolve(), aliases, json(), commonjs(), nodePolyfills()]
},
{
input: 'internal/html/static/assets/js/srp.js',
output: {
format: 'es',
file: 'internal/html/static/assets/js/srp.min.js',
name: 'srp',
plugins: [terser()],
},
plugins: [nodeResolve()]
}
]