-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.config.js
52 lines (49 loc) · 1.39 KB
/
server.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
// Rollup plugins
import babel from 'rollup-plugin-babel';
import eslint from 'rollup-plugin-eslint';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import json from 'rollup-plugin-json';
import progress from 'rollup-plugin-progress';
import replace from 'rollup-plugin-replace';
import uglify from 'rollup-plugin-uglify';
import { minify } from 'uglify-es';
export default {
entry: 'src/scripts/brewable.js',
dest: 'build/js/brewableserverbundle.js',
format: 'cjs',
external: [ 'os', 'path', 'buffer', 'http', 'https', 'events', 'util', 'tty', 'net', 'url', 'fs', 'crypto', 'querystring' ],
banner: '#!/usr/bin/env node',
sourceMap: 'inline',
plugins: [
progress({
clearLine: true // default: true
}),
json(),
resolve({
main: true,
preferBuiltins: true
}),
commonjs({
include: 'node_modules/**',
exclude: 'node_modules/rollup-plugin-node-builtins/**',
nameExports: {
}
}),
eslint({
configFile: '/home/pi/src/brewable/.eslintrcserver.json',
exclude: [
'src/styles/**',
'node_modules/**'
]
}),
babel({
exclude: 'node_modules/**',
}),
replace({
exclude: 'node_modules/**',
ENV: JSON.stringify(process.env.NODE_ENV || 'development'),
}),
(process.env.NODE_ENV === 'production' && uglify({}, minify)),
]
};