forked from le-jeu/iitc-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
49 lines (43 loc) · 1.26 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
43
44
45
46
47
48
49
import { babel } from "@rollup/plugin-babel";
import resolve from "@rollup/plugin-node-resolve";
import postcss from "rollup-plugin-postcss";
import url from "postcss-url";
import path from "path";
import iitcplugin from "./rollup-plugin-iitcplugin";
const buildName = process.env.BUILD;
const buildPath = "dist";
const pluginsPath = "src";
let pluginsId = ["search-guid", "portals-pictures", "what3words", "dialogs", "player-inventory", "redfection"];
export default pluginsId.map((p) => ({
input: path.join(pluginsPath, p),
output: {
format: "es",
exports: "none",
file: path.join(buildPath, p + ".user.js"),
interop: "auto",
},
plugins: [
iitcplugin({
id: p,
meta: require("./" + path.join(pluginsPath, p, "meta.json")),
downloadRoot: "https://le-jeu.github.io/iitc-plugins/",
//updateMeta: true,
timestamp: buildName === "local",
noWrapper: false,
buildName: buildName,
}),
resolve({
moduleDirectories: ['node_modules', 'src'],
extensions: ['.js', '.jsx', '.ts', '.tsx']
}),
babel({ babelHelpers: "bundled", extensions: ['.jsx', '.ts', '.tsx'] }),
postcss({
inject: false,
plugins: [
url({
url: "inline",
}),
],
}),
],
}));