-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
rollup.config.mjs
34 lines (28 loc) · 1006 Bytes
/
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
import banner2 from 'rollup-plugin-banner2'
import commonjs from '@rollup/plugin-commonjs'
import nodeResolve from '@rollup/plugin-node-resolve'
import terser from '@rollup/plugin-terser'
import typescript from '@rollup/plugin-typescript'
import pkg from './package.json' assert { type: 'json' }
const bannerText = `/*! *****************************************************************************
${pkg.name}
Version ${pkg.version}
${pkg.description}
Please submit bugs at ${pkg.bugs.url}
(c) ${pkg.author ? pkg.author : pkg.contributors}
Licence: ${pkg.license}
This file is auto-generated. Do not edit.
***************************************************************************** */
`
export default {
input: './src/frontend/Frontend.ts',
external: ['logger'],
plugins: [typescript({ module: 'ESNext' }), nodeResolve(), commonjs(), terser(), banner2(() => bannerText)],
output: {
file: `./${pkg.main}`,
format: 'iife',
globals: {
logger: 'Log'
}
}
}