-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
39 lines (37 loc) · 930 Bytes
/
rollup.config.js
File metadata and controls
39 lines (37 loc) · 930 Bytes
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
const typescript = require('rollup-plugin-typescript2')
const packageConfig = require('./package.json')
const copyright = `/*! ${packageConfig.name} v${packageConfig.version} | (c) ${new Date().getFullYear()} ${packageConfig.author} | Released under the ${packageConfig.license} License */`;
/**
* @type {import('rollup').RollupOptions}
*/
module.exports = {
input: packageConfig.typings,
output: [
{
file: packageConfig.main,
format: 'cjs',
sourcemap: false,
banner: copyright,
},
{
file: packageConfig.module,
format: 'esm',
sourcemap: false,
banner: copyright,
},
{
file: packageConfig['umd:main'],
format: 'umd',
sourcemap: false,
banner: copyright,
// umd global attr name
name: "WebUtils",
minifyInternalExports: true,
}
],
plugins: [
typescript({
tsconfig: 'tsconfig.json'
})
]
};