forked from rocket-boots/dungeon-boots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
41 lines (37 loc) · 894 Bytes
/
rollup.config.mjs
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
// import nodeResolve from 'rollup-plugin-node-resolve';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
// This is needed for Howler ^
// See https://github.com/goldfire/howler.js/issues/688#issuecomment-792357729
// import copy from 'rollup-plugin-copy';
const input = './src/example/game.js';
// External can avoid some warnings but later builds will need to either have these
// dependencies, or pull them in somehow.
const external = [];
const plugins = [
nodeResolve(),
commonjs(),
// copy({
// targets: [
// {
// src: './node_modules/roguelike-fonts/AppleII.ttf',
// dest: './static/fonts/',
// }
// ],
// }),
];
const watch = {
exclude: ['node_modules/**'],
};
export default [
{
input,
output: {
file: './build/game_bundle.js',
format: 'iife',
},
plugins,
external,
watch,
},
];