refactor: make all rollup config ES5 compatible (#20028)

So they can be required by other Node scripts.

PR Close #20028
This commit is contained in:
Hans Larsen
2017-10-30 10:55:45 -07:00
committed by Matias Niemelä
parent f1a9e1e361
commit b6abcb2500
34 changed files with 103 additions and 100 deletions

View File

@ -6,10 +6,10 @@
* found in the LICENSE file at https://angular.io/license
*/
import commonjs from 'rollup-plugin-commonjs';
import * as path from 'path';
const commonjs = require('rollup-plugin-commonjs');
const path = require('path');
import 'reflect-metadata';
require('reflect-metadata');
var m = /^\@angular\/((\w|\-)+)(\/(\w|\d|\/|\-)+)?$/;
var location = normalize('../../dist/packages-dist') + '/';
@ -49,7 +49,7 @@ function resolve(id, from) {
// hack to get around issues with default exports
var banner = `ts['default'] = ts['default'] || ts; fs['default'] = fs['default'] || fs;`;
export default {
module.exports = {
entry: '../../dist/packages-dist/compiler-cli/src/ngc.js',
dest: './browser-bundle.umd.js',
format: 'umd',