1 Star 0 Fork 11

yefeng001/at-angular

forked from ic/at-angular 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rollup.config.js 2.16 KB
一键复制 编辑 原始数据 按行查看 历史
ic 提交于 2017-10-17 20:14 . move file to code
import resolve from 'rollup-plugin-node-resolve'
import replace from 'rollup-plugin-replace'
const format = process.env.ROLLUP_FORMAT || 'es'
let globals = {
'@angular/animations': 'ng.animations',
'@angular/cdk': 'ng.cdk',
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/compiler': 'ng.compiler',
'@angular/forms': 'ng.forms',
'@angular/platform-browser': 'ng.platformBrowser',
'moment': 'moment',
'moment/locale/zh-cn': null,
'rxjs/BehaviorSubject': 'Rx',
'rxjs/Observable': 'Rx',
'rxjs/Subject': 'Rx',
'rxjs/Subscription': 'Rx',
'rxjs/observable/fromPromise': 'Rx.Observable',
'rxjs/observable/forkJoin': 'Rx.Observable',
'rxjs/observable/fromEvent': 'Rx.Observable',
'rxjs/observable/merge': 'Rx.Observable',
'rxjs/observable/of': 'Rx.Observable',
'rxjs/operator/auditTime': 'Rx.Observable.prototype',
'rxjs/operator/catch': 'Rx.Observable.prototype',
'rxjs/operator/debounceTime': 'Rx.Observable.prototype',
'rxjs/operator/distinctUntilChanged': 'Rx.Observable.prototype',
'rxjs/operator/do': 'Rx.Observable.prototype',
'rxjs/operator/filter': 'Rx.Observable.prototype',
'rxjs/operator/finally': 'Rx.Observable.prototype',
'rxjs/operator/first': 'Rx.Observable.prototype',
'rxjs/operator/map': 'Rx.Observable.prototype',
'rxjs/operator/pluck': 'Rx.Observable.prototype',
'rxjs/operator/startWith': 'Rx.Observable.prototype',
'rxjs/operator/switchMap': 'Rx.Observable.prototype',
'rxjs/operator/takeUntil': 'Rx.Observable.prototype',
'rxjs/operator/throttleTime': 'Rx.Observable.prototype',
}
if (format === 'es') {
globals = Object.assign(globals, {
'tslib': 'tslib',
})
}
let input
let file
switch (format) {
case 'es':
input = './publish/src/index.js'
file = './publish/esm15/index.js'
break
case 'umd':
input = './publish/esm5/index.js'
file = './publish/bundles/at-ng.umd.js'
break
default:
throw new Error(`format ${format} is not supported`)
}
export default {
input,
output: {
file,
format,
},
exports: 'named',
name: 'at-ng',
plugins: [replace({ "import * as moment": "import moment" }), resolve()],
external: Object.keys(globals),
globals,
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/yefenglaixi/at-angular.git
git@gitee.com:yefenglaixi/at-angular.git
yefenglaixi
at-angular
at-angular
master

搜索帮助