-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.prod.ts
34 lines (33 loc) · 975 Bytes
/
rollup.config.prod.ts
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
import path from 'path';
import type { RollupOptions } from 'rollup';
import typescript from '@rollup/plugin-typescript';
import { terser } from 'rollup-plugin-terser';
import json from '@rollup/plugin-json';
import injectProcessEnv from 'rollup-plugin-inject-process-env';
import config from './config';
import { paths } from './utils';
export default <RollupOptions>{
input: path.join(paths.src, 'registerPlugin.ts'),
output: [
{
file: path.join(paths.dist, `${config.getString('MOD_NAME')}.js`),
format: 'iife',
},
],
plugins: [
json({ compact: true }),
injectProcessEnv(config.getEnvConfigObject()),
typescript(),
terser({
compress: true,
mangle: true,
keep_classnames: false,
keep_fnames: false,
format: {
quote_style: 1,
wrap_iife: false,
preamble: '// Mod powered by https://github.com/wisnia74/openrct2-typescript-mod-template - MIT license',
},
}),
],
};