forked from typhonjs-fvtt-lib/validate-manifest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
32 lines (27 loc) · 792 Bytes
/
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
import path from 'path';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
// The deploy path for the rolled up validator functions
const s_DEPLOY_PATH = './dist';
// Produce sourcemaps / minify or not
const s_SOURCEMAP = true;
const s_MINIFY = true;
const outputPlugins = s_MINIFY ? [terser()] : [];
export default () =>
{
return [{
input: 'dist-intermediate/validators.js',
output: [{
file: `${s_DEPLOY_PATH}${path.sep}validators.js`,
format: 'es',
plugins: outputPlugins,
preferConst: true,
sourcemap: s_SOURCEMAP,
}],
plugins: [
resolve({ browser: true }),
commonjs()
]
}];
};