-
Notifications
You must be signed in to change notification settings - Fork 52
/
rollup.dev.config.mjs
43 lines (41 loc) · 1.09 KB
/
rollup.dev.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
import serve from 'rollup-plugin-serve';
import resolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import livereload from 'rollup-plugin-livereload';
import commonjs from '@rollup/plugin-commonjs';
import fs from 'fs';
const BUILD_OUTPUT_FOLDER = 'dev';
export default [
{
input: 'src/blockcerts-verifier/index.ts',
output: [
{
file: `${BUILD_OUTPUT_FOLDER}/index.js`,
format: 'iife',
name: 'BlockcertsVerifier',
inlineDynamicImports: true
}
],
plugins: [
commonjs(),
typescript(),
resolve({
browser: true,
preferBuiltins: true
}),
serve({
contentBase: [BUILD_OUTPUT_FOLDER, 'demo', 'node_modules', 'dist', 'test/fixtures'],
host: '0.0.0.0',
port: 8081,
open: true,
https: {
cert: fs.readFileSync(`${BUILD_OUTPUT_FOLDER}/https-cert/cert.pem`),
key: fs.readFileSync(`${BUILD_OUTPUT_FOLDER}/https-cert/key.pem`)
}
}),
livereload({
watch: BUILD_OUTPUT_FOLDER
})
]
}
];