forked from jopeek/fvtt-loot-sheet-npc-5e
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
42 lines (39 loc) · 1.23 KB
/
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
33
34
35
36
37
38
39
40
41
42
import copy from "rollup-plugin-copy";
import { nodeResolve } from '@rollup/plugin-node-resolve';
import sourcemaps from "rollup-plugin-sourcemaps";
import { terser } from "rollup-plugin-terser";
import replace from 'rollup-plugin-replace';
const staticFiles = ["templates", "libs", "fonts", "styles", "icons", "lang", "packs", "module.json"].map((file) => `src/${file}`);
/**
* @type {import('rollup').RollupOptions}
*/
const config = {
input: "src/lootsheetnpc5e.js",
external: ["../../../../../systems/dnd5e/module/actor/sheets/npc.js"],
output: {
dir: "dist/",
format: "es",
sourcemap: true,
assetFileNames: "[name].[ext]",
},
plugins: [
replace({
// If you would like DEV messages, specify 'development'
// Otherwise use 'production'
'process.env.NODE_ENV': JSON.stringify('production')
}),
nodeResolve({
tippy: true,
}),
sourcemaps(),
copy({
watch: staticFiles,
targets: staticFiles.map((file) => ({
src: `${file}`,
dest: "dist",
})),
}),
terser({ ecma: 2020, keep_fnames: true }),
],
};
module.exports = config;