-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.dev.js
50 lines (49 loc) · 1.35 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
41
42
43
44
45
46
47
48
49
50
import commonjs from "rollup-plugin-commonjs";
import resolve from "rollup-plugin-node-resolve";
import replace from "@rollup/plugin-replace";
import serve from "rollup-plugin-serve";
import typescript from "rollup-plugin-typescript2";
export default {
input: ["./src/Game.ts"],
output: {
file: "./dist/game.js",
name: "TripleTriadRemastered",
format: "iife",
sourcemap: true,
intro: "var global = window;",
},
plugins: [
replace({
"typeof CANVAS_RENDERER": JSON.stringify(true),
"typeof WEBGL_RENDERER": JSON.stringify(true),
"typeof EXPERIMENTAL": JSON.stringify(true),
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
"typeof PLUGIN_FBINSTANT": JSON.stringify(false),
"typeof FEATURE_SOUND": JSON.stringify(true),
}),
resolve({
extensions: [".ts", ".tsx"],
}),
commonjs({
include: [
"node_modules/eventemitter3/**",
"node_modules/phaser/**",
"node_modules/seedrandom/**",
"node_modules/shuffle-array/**",
],
exclude: ["node_modules/phaser/src/polyfills/requestAnimationFrame.js"],
sourceMap: true,
ignoreGlobal: true,
}),
typescript(),
serve({
open: true,
contentBase: "dist",
host: "localhost",
port: 5000,
headers: {
"Access-Control-Allow-Origin": "*",
},
}),
],
};