From b6abcb2500b2aa486ef681a1bdf293489d13ffc5 Mon Sep 17 00:00:00 2001 From: Hans Larsen Date: Mon, 30 Oct 2017 10:55:45 -0700 Subject: [PATCH] refactor: make all rollup config ES5 compatible (#20028) So they can be required by other Node scripts. PR Close #20028 --- packages/animations/browser/rollup.config.js | 6 +++--- packages/animations/browser/testing/rollup.config.js | 6 +++--- packages/animations/rollup.config.js | 6 +++--- packages/common/http/rollup.config.js | 2 +- packages/common/http/testing/rollup.config.js | 6 +++--- packages/common/rollup.config.js | 6 +++--- packages/common/testing/rollup.config.js | 6 +++--- packages/compiler-cli/browser-rollup.config.js | 8 ++++---- packages/compiler/rollup.config.js | 6 +++--- packages/compiler/testing/rollup.config.js | 6 +++--- packages/core/rollup.config.js | 6 +++--- packages/core/testing/rollup.config.js | 6 +++--- packages/forms/rollup.config.js | 6 +++--- packages/http/rollup.config.js | 6 +++--- packages/http/testing/rollup.config.js | 6 +++--- packages/language-service/rollup.config.js | 8 ++++---- packages/platform-browser-dynamic/rollup.config.js | 6 +++--- .../platform-browser-dynamic/testing/rollup.config.js | 6 +++--- packages/platform-browser/animations/rollup.config.js | 6 +++--- packages/platform-browser/rollup.config.js | 6 +++--- packages/platform-browser/testing/rollup.config.js | 6 +++--- packages/platform-server/rollup.config.js | 6 +++--- packages/platform-server/testing/rollup.config.js | 6 +++--- packages/platform-webworker-dynamic/rollup.config.js | 6 +++--- packages/platform-webworker/rollup.config.js | 6 +++--- packages/rollup.config.js | 6 ++++-- packages/router/rollup.config.js | 6 +++--- packages/router/testing/rollup.config.js | 6 +++--- packages/router/upgrade/rollup.config.js | 7 ++++--- packages/service-worker/cli/rollup-cli.config.js | 4 ++-- packages/service-worker/config/rollup.config.js | 6 +++--- packages/service-worker/rollup.config.js | 6 +++--- packages/upgrade/rollup.config.js | 6 +++--- packages/upgrade/static/rollup.config.js | 6 +++--- 34 files changed, 103 insertions(+), 100 deletions(-) diff --git a/packages/animations/browser/rollup.config.js b/packages/animations/browser/rollup.config.js index f78edf2b0e..019d1c62cd 100644 --- a/packages/animations/browser/rollup.config.js +++ b/packages/animations/browser/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -15,7 +15,7 @@ const globals = { '@angular/animations': 'ng.animations' }; -export default { +module.exports = { entry: '../../../dist/packages-dist/animations/esm5/browser.js', dest: '../../../dist/packages-dist/animations/bundles/animations-browser.umd.js', format: 'umd', diff --git a/packages/animations/browser/testing/rollup.config.js b/packages/animations/browser/testing/rollup.config.js index 4b82a2c0f3..edfdfb43fd 100644 --- a/packages/animations/browser/testing/rollup.config.js +++ b/packages/animations/browser/testing/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -16,7 +16,7 @@ const globals = { 'rxjs/Subject': 'Rx', }; -export default { +module.exports = { entry: '../../../../dist/packages-dist/animations/esm5/browser/testing.js', dest: '../../../../dist/packages-dist/animations/bundles/animations-browser-testing.umd.js', format: 'umd', diff --git a/packages/animations/rollup.config.js b/packages/animations/rollup.config.js index 30084d92a5..4a3f63967d 100644 --- a/packages/animations/rollup.config.js +++ b/packages/animations/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -16,7 +16,7 @@ const globals = { 'rxjs/Subject': 'Rx', }; -export default { +module.exports = { entry: '../../dist/packages-dist/animations/esm5/animations.js', dest: '../../dist/packages-dist/animations/bundles/animations.umd.js', format: 'umd', diff --git a/packages/common/http/rollup.config.js b/packages/common/http/rollup.config.js index 439f9205f1..bb3d2346bf 100644 --- a/packages/common/http/rollup.config.js +++ b/packages/common/http/rollup.config.js @@ -20,7 +20,7 @@ const globals = { 'rxjs/operator/map': 'Rx.Observable.prototype', }; -export default { +module.exports = { entry: '../../../dist/packages-dist/common/esm5/http.js', dest: '../../../dist/packages-dist/common/bundles/common-http.umd.js', format: 'umd', diff --git a/packages/common/http/testing/rollup.config.js b/packages/common/http/testing/rollup.config.js index 58fdb90e00..758fdb05a0 100644 --- a/packages/common/http/testing/rollup.config.js +++ b/packages/common/http/testing/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -19,7 +19,7 @@ const globals = { 'rxjs/Subject': 'Rx', }; -export default { +module.exports = { entry: '../../../../dist/packages-dist/common/esm5/http/testing.js', dest: '../../../../dist/packages-dist/common/bundles/common-http-testing.umd.js', format: 'umd', diff --git a/packages/common/rollup.config.js b/packages/common/rollup.config.js index 3efc35ff03..390451dda5 100644 --- a/packages/common/rollup.config.js +++ b/packages/common/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -15,7 +15,7 @@ const globals = { 'rxjs/Subject': 'Rx', }; -export default { +module.exports = { entry: '../../dist/packages-dist/common/esm5/common.js', dest: '../../dist/packages-dist/common/bundles/common.umd.js', format: 'umd', diff --git a/packages/common/testing/rollup.config.js b/packages/common/testing/rollup.config.js index 79b1d5f406..335ba39609 100644 --- a/packages/common/testing/rollup.config.js +++ b/packages/common/testing/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -16,7 +16,7 @@ const globals = { 'rxjs/Subject': 'Rx' }; -export default { +module.exports = { entry: '../../../dist/packages-dist/common/esm5/testing.js', dest: '../../../dist/packages-dist/common/bundles/common-testing.umd.js', format: 'umd', diff --git a/packages/compiler-cli/browser-rollup.config.js b/packages/compiler-cli/browser-rollup.config.js index 806a680211..d5c583c04b 100644 --- a/packages/compiler-cli/browser-rollup.config.js +++ b/packages/compiler-cli/browser-rollup.config.js @@ -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', diff --git a/packages/compiler/rollup.config.js b/packages/compiler/rollup.config.js index 11d72b7375..9ee995b2ac 100644 --- a/packages/compiler/rollup.config.js +++ b/packages/compiler/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -15,7 +15,7 @@ const globals = { 'rxjs/Subject': 'Rx', }; -export default { +module.exports = { entry: '../../dist/packages-dist/compiler/esm5/compiler.js', dest: '../../dist/packages-dist/compiler/bundles/compiler.umd.js', format: 'umd', diff --git a/packages/compiler/testing/rollup.config.js b/packages/compiler/testing/rollup.config.js index ff2a352e64..43b89f6e81 100644 --- a/packages/compiler/testing/rollup.config.js +++ b/packages/compiler/testing/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -17,7 +17,7 @@ const globals = { 'rxjs/Subject': 'Rx' }; -export default { +module.exports = { entry: '../../../dist/packages-dist/compiler/esm5/testing.js', dest: '../../../dist/packages-dist/compiler/bundles/compiler-testing.umd.js', format: 'umd', diff --git a/packages/core/rollup.config.js b/packages/core/rollup.config.js index 5059ccf024..35ee75f902 100644 --- a/packages/core/rollup.config.js +++ b/packages/core/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { 'rxjs/Observable': 'Rx', @@ -18,7 +18,7 @@ const globals = { 'rxjs/operator/share': 'Rx.Observable.prototype' }; -export default { +module.exports = { entry: '../../dist/packages-dist/core/esm5/core.js', dest: '../../dist/packages-dist/core/bundles/core.umd.js', format: 'umd', diff --git a/packages/core/testing/rollup.config.js b/packages/core/testing/rollup.config.js index 3fd8842649..9443bae788 100644 --- a/packages/core/testing/rollup.config.js +++ b/packages/core/testing/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -15,7 +15,7 @@ const globals = { 'rxjs/Subject': 'Rx', }; -export default { +module.exports = { entry: '../../../dist/packages-dist/core/esm5/testing.js', dest: '../../../dist/packages-dist/core/bundles/core-testing.umd.js', format: 'umd', diff --git a/packages/forms/rollup.config.js b/packages/forms/rollup.config.js index 202a74b604..b57dcc50a0 100644 --- a/packages/forms/rollup.config.js +++ b/packages/forms/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -21,7 +21,7 @@ const globals = { 'rxjs/operator/map': 'Rx.Observable.prototype' }; -export default { +module.exports = { entry: '../../dist/packages-dist/forms/esm5/forms.js', dest: '../../dist/packages-dist/forms/bundles/forms.umd.js', format: 'umd', diff --git a/packages/http/rollup.config.js b/packages/http/rollup.config.js index c7a1028a46..a270c03b95 100644 --- a/packages/http/rollup.config.js +++ b/packages/http/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -17,7 +17,7 @@ const globals = { 'rxjs/Subject': 'Rx' }; -export default { +module.exports = { entry: '../../dist/packages-dist/http/esm5/http.js', dest: '../../dist/packages-dist/http/bundles/http.umd.js', format: 'umd', diff --git a/packages/http/testing/rollup.config.js b/packages/http/testing/rollup.config.js index 729eba7520..71c3182c8e 100644 --- a/packages/http/testing/rollup.config.js +++ b/packages/http/testing/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -20,7 +20,7 @@ const globals = { 'rxjs/operator/take': 'Rx.Observable.prototype' }; -export default { +module.exports = { entry: '../../../dist/packages-dist/http/esm5/testing.js', dest: '../../../dist/packages-dist/http/bundles/http-testing.umd.js', format: 'umd', diff --git a/packages/language-service/rollup.config.js b/packages/language-service/rollup.config.js index 2ef68acb97..d561a23a55 100644 --- a/packages/language-service/rollup.config.js +++ b/packages/language-service/rollup.config.js @@ -6,9 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ -import commonjs from 'rollup-plugin-commonjs'; -import sourcemaps from 'rollup-plugin-sourcemaps'; -import * as path from 'path'; +const commonjs = require('rollup-plugin-commonjs'); +const sourcemaps = require('rollup-plugin-sourcemaps'); +const path = require('path'); var m = /^\@angular\/((\w|\-)+)(\/(\w|\d|\/|\-)+)?$/; var location = normalize('../../dist/packages-dist') + '/'; @@ -60,7 +60,7 @@ module.exports = function(provided) { } `; -export default { +module.exports = { entry: '../../dist/packages-dist/language-service/esm5/language-service.js', dest: '../../dist/packages-dist/language-service/bundles/language-service.umd.js', format: 'amd', diff --git a/packages/platform-browser-dynamic/rollup.config.js b/packages/platform-browser-dynamic/rollup.config.js index bff6cf8696..c50a5f664c 100644 --- a/packages/platform-browser-dynamic/rollup.config.js +++ b/packages/platform-browser-dynamic/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -16,7 +16,7 @@ const globals = { '@angular/platform-browser': 'ng.platformBrowser', }; -export default { +module.exports = { entry: '../../dist/packages-dist/platform-browser-dynamic/esm5/platform-browser-dynamic.js', dest: '../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', format: 'umd', diff --git a/packages/platform-browser-dynamic/testing/rollup.config.js b/packages/platform-browser-dynamic/testing/rollup.config.js index 7d92bf1188..c273beaeec 100644 --- a/packages/platform-browser-dynamic/testing/rollup.config.js +++ b/packages/platform-browser-dynamic/testing/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -20,7 +20,7 @@ const globals = { '@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic' }; -export default { +module.exports = { entry: '../../../dist/packages-dist/platform-browser-dynamic/esm5/testing.js', dest: '../../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js', diff --git a/packages/platform-browser/animations/rollup.config.js b/packages/platform-browser/animations/rollup.config.js index 6d888f264a..f2dda0aaff 100644 --- a/packages/platform-browser/animations/rollup.config.js +++ b/packages/platform-browser/animations/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -17,7 +17,7 @@ const globals = { '@angular/animations/browser': 'ng.animations.browser' }; -export default { +module.exports = { entry: '../../../dist/packages-dist/platform-browser/esm5/animations.js', dest: '../../../dist/packages-dist/platform-browser/bundles/platform-browser-animations.umd.js', format: 'umd', diff --git a/packages/platform-browser/rollup.config.js b/packages/platform-browser/rollup.config.js index 279f09e8df..95d5406e15 100644 --- a/packages/platform-browser/rollup.config.js +++ b/packages/platform-browser/rollup.config.js @@ -6,15 +6,15 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', '@angular/common': 'ng.common', }; -export default { +module.exports = { entry: '../../dist/packages-dist/platform-browser/esm5/platform-browser.js', dest: '../../dist/packages-dist/platform-browser/bundles/platform-browser.umd.js', format: 'umd', diff --git a/packages/platform-browser/testing/rollup.config.js b/packages/platform-browser/testing/rollup.config.js index cdaef80fd7..208a912266 100644 --- a/packages/platform-browser/testing/rollup.config.js +++ b/packages/platform-browser/testing/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -15,7 +15,7 @@ const globals = { '@angular/platform-browser': 'ng.platformBrowser' }; -export default { +module.exports = { entry: '../../../dist/packages-dist/platform-browser/esm5/testing.js', dest: '../../../dist/packages-dist/platform-browser/bundles/platform-browser-testing.umd.js', format: 'umd', diff --git a/packages/platform-server/rollup.config.js b/packages/platform-server/rollup.config.js index 0b9d4e3cfa..f89c6ee2e0 100644 --- a/packages/platform-server/rollup.config.js +++ b/packages/platform-server/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/animations': 'ng.animations', @@ -24,7 +24,7 @@ const globals = { 'rxjs/operator/first': 'Rx.Observable.prototype' }; -export default { +module.exports = { entry: '../../dist/packages-dist/platform-server/esm5/platform-server.js', dest: '../../dist/packages-dist/platform-server/bundles/platform-server.umd.js', format: 'umd', diff --git a/packages/platform-server/testing/rollup.config.js b/packages/platform-server/testing/rollup.config.js index c545d4ca73..7c4d2f0f7c 100644 --- a/packages/platform-server/testing/rollup.config.js +++ b/packages/platform-server/testing/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -19,7 +19,7 @@ const globals = { '@angular/platform-browser-dynamic/testing': 'ng.platformBrowserDynamic.testing' }; -export default { +module.exports = { entry: '../../../dist/packages-dist/platform-server/esm5/testing.js', dest: '../../../dist/packages-dist/platform-server/bundles/platform-server-testing.umd.js', format: 'umd', diff --git a/packages/platform-webworker-dynamic/rollup.config.js b/packages/platform-webworker-dynamic/rollup.config.js index 953a1e2fe5..2dffde4095 100644 --- a/packages/platform-webworker-dynamic/rollup.config.js +++ b/packages/platform-webworker-dynamic/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -18,7 +18,7 @@ const globals = { '@angular/platform-webworker': 'ng.platformWebworker', }; -export default { +module.exports = { entry: '../../dist/packages-dist/platform-webworker-dynamic/esm5/platform-webworker-dynamic.js', dest: '../../dist/packages-dist/platform-webworker-dynamic/bundles/platform-webworker-dynamic.umd.js', diff --git a/packages/platform-webworker/rollup.config.js b/packages/platform-webworker/rollup.config.js index 19d1a37e06..4e6f06c34b 100644 --- a/packages/platform-webworker/rollup.config.js +++ b/packages/platform-webworker/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -17,7 +17,7 @@ const globals = { 'rxjs/Subject': 'Rx' }; -export default { +module.exports = { entry: '../../dist/packages-dist/platform-webworker/esm5/platform-webworker.js', dest: '../../dist/packages-dist/platform-webworker/bundles/platform-webworker.umd.js', format: 'umd', diff --git a/packages/rollup.config.js b/packages/rollup.config.js index 9b5a41c52b..af011b96c2 100644 --- a/packages/rollup.config.js +++ b/packages/rollup.config.js @@ -6,6 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import sourcemaps from 'rollup-plugin-sourcemaps'; +const sourcemaps = require('rollup-plugin-sourcemaps'); -export default {plugins: [sourcemaps()]}; +module.exports = { + plugins: [sourcemaps()] +}; diff --git a/packages/router/rollup.config.js b/packages/router/rollup.config.js index cfb684d511..9822296929 100644 --- a/packages/router/rollup.config.js +++ b/packages/router/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -39,7 +39,7 @@ const globals = { 'rxjs/operator/concatMap': 'Rx.Observable.prototype' }; -export default { +module.exports = { entry: '../../dist/packages-dist/router/esm5/router.js', dest: '../../dist/packages-dist/router/bundles/router.umd.js', format: 'umd', diff --git a/packages/router/testing/rollup.config.js b/packages/router/testing/rollup.config.js index 162561bb44..20c9f99ca3 100644 --- a/packages/router/testing/rollup.config.js +++ b/packages/router/testing/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -17,7 +17,7 @@ const globals = { '@angular/router': 'ng.router' }; -export default { +module.exports = { entry: '../../../dist/packages-dist/router/esm5/testing.js', dest: '../../../dist/packages-dist/router/bundles/router-testing.umd.js', format: 'umd', diff --git a/packages/router/upgrade/rollup.config.js b/packages/router/upgrade/rollup.config.js index 8a0efd0639..672c187693 100644 --- a/packages/router/upgrade/rollup.config.js +++ b/packages/router/upgrade/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -16,7 +16,8 @@ const globals = { '@angular/upgrade/static': 'ng.upgrade.static' }; -export default { + +module.exports = { entry: '../../../dist/packages-dist/router/esm5/upgrade.js', dest: '../../../dist/packages-dist/router/bundles/router-upgrade.umd.js', format: 'umd', diff --git a/packages/service-worker/cli/rollup-cli.config.js b/packages/service-worker/cli/rollup-cli.config.js index 66b8fae28f..c63011679d 100644 --- a/packages/service-worker/cli/rollup-cli.config.js +++ b/packages/service-worker/cli/rollup-cli.config.js @@ -6,9 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; +const resolve = require('rollup-plugin-node-resolve'); -export default { +module.exports = { entry: '../../dist/all/@angular/service-worker/cli-custom/main.js', dest: '../../dist/packages-dist/service-worker/ngsw-config-tmp.js', format: 'iife', diff --git a/packages/service-worker/config/rollup.config.js b/packages/service-worker/config/rollup.config.js index 877791e907..535074ba07 100644 --- a/packages/service-worker/config/rollup.config.js +++ b/packages/service-worker/config/rollup.config.js @@ -6,12 +6,12 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = {}; -export default { +module.exports = { entry: '../../../dist/packages-dist/service-worker/esm5/config.js', dest: '../../../dist/packages-dist/service-worker/bundles/service-worker-config.umd.js', format: 'umd', diff --git a/packages/service-worker/rollup.config.js b/packages/service-worker/rollup.config.js index 78f04f207a..00d9ea89e0 100644 --- a/packages/service-worker/rollup.config.js +++ b/packages/service-worker/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -34,7 +34,7 @@ const globals = { 'rxjs/operator/toPromise': 'Rx.Observable.prototype', }; -export default { +module.exports = { entry: '../../dist/packages-dist/service-worker/esm5/service-worker.js', dest: '../../dist/packages-dist/service-worker/bundles/service-worker.umd.js', format: 'umd', diff --git a/packages/upgrade/rollup.config.js b/packages/upgrade/rollup.config.js index bdbf83daa5..188220110b 100644 --- a/packages/upgrade/rollup.config.js +++ b/packages/upgrade/rollup.config.js @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core', @@ -22,7 +22,7 @@ const globals = { 'rxjs/Observable': 'Rx', }; -export default { +module.exports = { entry: '../../dist/packages-dist/upgrade/esm5/upgrade.js', dest: '../../dist/packages-dist/upgrade/bundles/upgrade.umd.js', format: 'umd', diff --git a/packages/upgrade/static/rollup.config.js b/packages/upgrade/static/rollup.config.js index 58c8640c94..1eb6577bd9 100644 --- a/packages/upgrade/static/rollup.config.js +++ b/packages/upgrade/static/rollup.config.js @@ -6,14 +6,14 @@ * found in the LICENSE file at https://angular.io/license */ -import resolve from 'rollup-plugin-node-resolve'; -import sourcemaps from 'rollup-plugin-sourcemaps'; +const resolve = require('rollup-plugin-node-resolve'); +const sourcemaps = require('rollup-plugin-sourcemaps'); const globals = { '@angular/core': 'ng.core' }; -export default { +module.exports = { entry: '../../../dist/packages-dist/upgrade/esm5/static.js', dest: '../../../dist/packages-dist/upgrade/bundles/upgrade-static.umd.js', format: 'umd',