-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
37 lines (34 loc) · 1.17 KB
/
Copy pathrollup.config.js
File metadata and controls
37 lines (34 loc) · 1.17 KB
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
import { terser } from 'rollup-plugin-terser';
// output directory for build files
const outputDir = "dist/";
// PS: just an example configuration. Alter it according to your needs.
export default {
// input source code file
input: './edo.js',
output: [
{
// for only web-browser imports
file: outputDir + 'edo.js',
format: 'iife',
name: 'edo.js', // the global which can be used during imports. You can access classes like `edojs.EDO` for example
},
{
// for UMD import (works both in browsers and node.js)
file: outputDir + 'edo.umd.js',
format: 'umd',
name: 'edo.js' // the global which can be used during imports
},
{
// for ESM imports
file: outputDir + 'edo.es.js',
format: 'es'
},
{
// IIFE format with minification applied
file: outputDir + 'edo.min.js',
format: 'iife',
name: 'edo.js', // the global which can be used during imports. You can access classes like `edojs.EDO` for example
plugins: [terser()]
}
]
};