-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.rollup.js
More file actions
71 lines (69 loc) · 1.99 KB
/
build.rollup.js
File metadata and controls
71 lines (69 loc) · 1.99 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
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
65
66
67
68
69
70
71
'use strict';
const libName = require('./package.json').name;
const camelCase = require('camelcase');
const nodeResolve = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');
const sourcemaps = require('rollup-plugin-sourcemaps');
module.exports = {
output: {
name: camelCase(libName),
// ATTENTION:
// Add any dependency or peer dependency your library to `globals` and `external`.
// This is required for UMD bundle users.
globals: {
// The key here is library name, and the value is the the name of the global variable name
// the window object.
// See https://github.com/rollup/rollup/wiki/JavaScript-API#globals for more.
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/material': 'ng.material',
'@angular/forms': 'ng.forms',
'rxjs': 'Rx',
'rxjs/operators': 'Rx.operators',
'rxjs/Observable': 'Rx',
'rxjs/ReplaySubject': 'Rx',
'rxjs/observable/fromEvent': 'Rx.Observable',
'rxjs/observable/race': 'Rx.Observable',
'rxjs/observable/of': 'Rx.Observable',
'rxjs/observable/throw': 'Rx.Observable'
}
},
external: [
// List of dependencies
// See https://github.com/rollup/rollup/wiki/JavaScript-API#external for more.
'@angular/core',
'@angular/common',
'@angular/material',
'@angular/forms',
'rxjs',
'rxjs/operators',
'rxjs/Observable',
'rxjs/ReplaySubject',
'rxjs/observable/fromEvent',
'rxjs/observable/race',
'rxjs/observable/of',
'rxjs/observable/throw'
],
plugins: [
nodeResolve({
jsnext: true,
module: true,
main: true,
browser: true
}),
commonjs({
include: [
'node_modules/rxjs/**',
'node_modules/livr/**',
'node_modules/lodash-es/**',
],
exclude: [
'node_modules/lodash/**',
],
namedExports: {
'node_modules/livr/lib/LIVR.js': [ 'Validator' ]
}
}),
sourcemaps()
]
};