forked from cryptpad/cryptpad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.mjs
More file actions
53 lines (50 loc) · 1.51 KB
/
rollup.config.mjs
File metadata and controls
53 lines (50 loc) · 1.51 KB
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
52
53
// SPDX-FileCopyrightText: 2023 XWiki CryptPad Team <contact@cryptpad.org> and contributors
//
// SPDX-License-Identifier: AGPL-3.0-or-later
import {nodeResolve} from "@rollup/plugin-node-resolve"
import commonjs from '@rollup/plugin-commonjs';
//import builtins from 'rollup-plugin-node-builtins';
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';
import json from '@rollup/plugin-json';
//import nodePolyfills from 'rollup-plugin-polyfill-node';
export default {
//input: "./_src/worker/index.ts",
input: "./src/worker/store.ts",
output: [{
name: 'cryptpad-worker',
file: "./www/common/worker.bundle.js",
format: "umd",
plugins: [
terser({
format: {
comments: 'some',
beautify: true,
ecma: '2015',
},
compress: false,
mangle: false,
module: true,
}),
]
}, {
name: 'cryptpad-worker-min',
file: "./www/common/worker.bundle.min.js",
format: "umd",
plugins: [terser({
format: { comments: false, ecma: '2015' }
})]
}],
preserveSymlinks: true,
plugins: [
json(),
typescript(),
//builtins(),
nodeResolve({
}),
commonjs({
ignore:['crypto', 'node:http', 'node:https'] // required by tweetnacl for node
}),
//nodePolyfills( /* options */ )
]
}