-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathrollup.config.js
More file actions
37 lines (36 loc) · 1.03 KB
/
rollup.config.js
File metadata and controls
37 lines (36 loc) · 1.03 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
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';
import copy from 'rollup-plugin-copy';
export default [{
input: './src/server/index.ts',
external: ['bcrypt', 'crypto', 'dotenv/config', 'finalhandler', 'formidable', 'pg', 'node:crypto', 'node:fs', 'node:http', 'node:process', 'nodemailer', 'serve-static', 'ws'],
output: {
file: './dist/server.min.js',
format: 'es',
},
plugins: [typescript()]
}, {
input: './src/library/index.ts',
output: {
file: './dist/lobby.min.js',
format: 'iife',
name: 'lobby',
sourcemap: true,
},
plugins: [typescript(), terser()]
},
{
input: './src/public/index.ts',
output: {
file: './dist/bundle.min.js',
format: 'iife',
name: 'bundle',
sourcemap: true,
},
plugins: [typescript(), terser(), copy({
targets: [
{ src: 'src/public/index.html', dest: 'dist' },
{ src: 'src/public/css/style.css', dest: 'dist/css' }
]
})]
}];