UNPKG

1.28 kBJavaScriptView Raw
1import commonjs from 'rollup-plugin-commonjs';
2import nodeResolve from 'rollup-plugin-node-resolve';
3import angular from 'rollup-plugin-angular-aot';
4import globals from 'rollup-plugin-node-globals';
5import { plugin as analyze } from 'rollup-plugin-analyzer';
6import { uglify } from 'rollup-plugin-uglify';
7import json from 'rollup-plugin-json';
8
9export default {
10 input: 'dist/index.js',
11 output: {
12 name: 'aws-amplify-angular',
13 file: 'dist/bundles/aws-amplify-angular.umd.js',
14 format: 'umd',
15 globals: {
16 lodash: '_',
17 '@ionic/angular': 'IonicModule',
18 'aws-amplify': 'Amplify',
19 '@angular/core': 'ng.core',
20 '@angular/common': 'ng.common',
21 'rxjs/Observable': 'Rx',
22 'rxjs/Subscription': 'Rx',
23 'rxjs/ReplaySubject': 'Rx',
24 'rxjs/add/operator/map': 'Rx.Observable.prototype',
25 'rxjs/add/operator/mergeMap': 'Rx.Observable.prototype',
26 'rxjs/add/observable/fromEvent': 'Rx.Observable',
27 'rxjs/add/observable/of': 'Rx.Observable',
28 },
29 },
30 external: [
31 'aws-sdk',
32 '@angular/core',
33 '@angular/common',
34 'aws-amplify',
35 '@ionic/angular',
36 '@aws-amplify/core',
37 ],
38 plugins: [
39 nodeResolve({ preferBuiltins: false, modulesOnly: true }),
40 commonjs({ include: 'node_modules/**' }),
41 globals(),
42 json(),
43 uglify(),
44 analyze({ limit: 1 }),
45 ],
46};