-
Notifications
You must be signed in to change notification settings - Fork 4
/
rollup.config.js
46 lines (42 loc) · 1.26 KB
/
rollup.config.js
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
import angular from 'rollup-plugin-angular';
import typescript from 'rollup-plugin-typescript2';
import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import { minify as minifyHtml } from 'html-minifier';
const htmlminOpts = {
caseSensitive: true,
collapseWhitespace: true,
removeComments: true,
};
export default {
entry: 'dist/index.js',
dest: 'dist/bundles/ngx-user-admin.umd.js',
sourceMap: false,
format: 'umd',
moduleName: 'ng.ngx-user-admin',
external: ['@angular/http', '@angular/router'],
plugins: [
angular({
preprocessors: {
template: template => minifyHtml(template, htmlminOpts)
}
}),
commonjs({
include: 'node_modules/**'
}),
typescript(),
nodeResolve({ jsnext: true, main: true })
],
globals: {
'@angular/core': 'ng.core',
'@angular/http' : 'vendor._angular_http',
'@angular/router' : 'vendor._angular_router',
'rxjs/Observable': 'Rx',
'rxjs/ReplaySubject': 'Rx',
'rxjs/add/operator/map': 'Rx.Observable.prototype',
'rxjs/add/operator/mergeMap': 'Rx.Observable.prototype',
'rxjs/add/observable/fromEvent': 'Rx.Observable',
'rxjs/add/observable/of': 'Rx.Observable',
'npm:moment/moment': 'moment'
}
}