-
Notifications
You must be signed in to change notification settings - Fork 4
/
rollup.config.js
45 lines (43 loc) · 1.02 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
const commonjs = require("@rollup/plugin-commonjs");
const nodeResolve = require("@rollup/plugin-node-resolve");
const terser = require("@rollup/plugin-terser");
const typescript = require("@rollup/plugin-typescript");
const fetchModuleVersion = require("./scripts/fetch_module_version");
const pkg = require("./package.json");
const aksVer = fetchModuleVersion("@akashic/akashic-engine");
const name = `akashic-engine-standalone-${aksVer}`;
const banner = `/*! akashic-engine-standalone@${pkg.version} */`;
module.exports = {
input: "src/main.ts",
output: [
{
file: `dist/${name}.js`,
format: "umd",
name: "AE",
banner,
plugins: []
},
{
file: `dist/${name}.min.js`,
format: "umd",
name: "AE",
banner,
plugins: [
terser({
format: {
comments: "some"
}
})
]
}
],
plugins: [
typescript({
declaration: false,
}),
commonjs({
extensions: [".js", ".ts"]
}),
nodeResolve()
]
};