forked from Basssiiie/OpenRCT2-RideVehicleEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.dev.js
40 lines (37 loc) · 1.01 KB
/
rollup.config.dev.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
import replace from "@rollup/plugin-replace";
import typescript from "@rollup/plugin-typescript";
import { terser } from "rollup-plugin-terser";
export default {
input: "./src/registerPlugin.ts",
output: {
file: "./dist/RideVehicleEditor.js", // CHANGE THIS TO YOUR OPENRCT2 PLUGIN FOLDER FOR HOT RELOAD
// TO IGNORE GIT CHANGES ON THIS FILE: git update-index --skip-worktree rollup.config.dev.js
// TO ACCEPT GIT CHANGES ON THIS FILE AGAIN: git update-index --no-skip-worktree rollup.config.dev.js
format: "iife",
},
plugins: [
replace({
include: "./src/environment.ts",
preventAssignment: true,
values: {
__BUILD_CONFIGURATION__: JSON.stringify("development")
}
}),
typescript(),
terser({
format: {
quote_style: 1,
wrap_iife: true,
preamble: "// Get the latest version: https://github.com/Basssiiie/OpenRCT2-RideVehicleEditor",
beautify: true
},
mangle: {
properties: {
regex: /^_/
}
},
// Useful only for stacktraces:
keep_fnames: true,
}),
],
};