-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
rollup.config.mjs
executable file
·64 lines (53 loc) · 1.55 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import nodeResolve from "@rollup/plugin-node-resolve";
import commonjs from '@rollup/plugin-commonjs';
import json from "@rollup/plugin-json";
import serve from "rollup-plugin-serve";
import terser from '@rollup/plugin-terser';
export default {
input: 'src/kernel.js',
output: [
{
file: 'dist/kernel.min.js',
format: "es",
strict: false,
manualChunks: () => 'merged',
plugins: [terser()]
},
{
dir: 'dist/',
format: "es",
strict: false
}
],
plugins : [
nodeResolve({
jsnext: true,
main: false
}),
json(),
commonjs({transformMixedEsModules:true}),
/*serve({
// Launch in browser (default: false)
open: true,
// Page to navigate to when opening the browser.
// Will not do anything if open=false.
// Remember to start with a slash.
openPage: '_gallery.html',
// Show server address in console (default: true)
verbose: true,
// Multiple folders to serve from
contentBase: ['dist', 'tests/public', 'tests/Packages', 'assets'],
// Options used in setting up server
host: 'localhost',
port: 10001,
// execute function after server has begun listening
onListening: function (server) {
const address = server.address()
const host = address.address === '::' ? 'localhost' : address.address
// by using a bound function, we can access options as `this`
const protocol = this.https ? 'https' : 'http'
console.log(`Server listening at ${protocol}://localhost:${address.port}/`)
}
})*/
]
};