From 82e49230ff80fe716f2c2aff3fe638bdc96c57ca Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Thu, 28 Sep 2017 09:29:22 -0700 Subject: [PATCH] build: Give names to the AMD modules nested in Angular UMD distro (#19425) --- packages/animations/browser/rollup.config.js | 1 + packages/animations/browser/testing/rollup.config.js | 1 + packages/animations/rollup.config.js | 1 + packages/common/http/rollup.config.js | 1 + packages/common/http/testing/rollup.config.js | 1 + packages/common/rollup.config.js | 1 + packages/common/testing/rollup.config.js | 1 + packages/compiler-cli/browser-rollup.config.js | 1 + packages/compiler/rollup.config.js | 1 + packages/compiler/testing/rollup.config.js | 1 + packages/core/rollup.config.js | 1 + packages/core/testing/rollup.config.js | 1 + packages/forms/rollup.config.js | 1 + packages/http/rollup.config.js | 1 + packages/http/testing/rollup.config.js | 1 + packages/language-service/rollup.config.js | 6 ++++++ packages/platform-browser-dynamic/rollup.config.js | 1 + packages/platform-browser-dynamic/testing/rollup.config.js | 1 + packages/platform-browser/animations/rollup.config.js | 1 + packages/platform-browser/rollup.config.js | 1 + packages/platform-browser/testing/rollup.config.js | 1 + packages/platform-server/rollup.config.js | 1 + packages/platform-server/testing/rollup.config.js | 1 + packages/platform-webworker-dynamic/rollup.config.js | 1 + packages/platform-webworker/rollup.config.js | 1 + packages/router/rollup.config.js | 1 + packages/router/testing/rollup.config.js | 1 + packages/router/upgrade/rollup.config.js | 1 + packages/upgrade/rollup.config.js | 1 + packages/upgrade/static/rollup.config.js | 1 + 30 files changed, 35 insertions(+) diff --git a/packages/animations/browser/rollup.config.js b/packages/animations/browser/rollup.config.js index 930c673326..f78edf2b0e 100644 --- a/packages/animations/browser/rollup.config.js +++ b/packages/animations/browser/rollup.config.js @@ -20,6 +20,7 @@ export default { dest: '../../../dist/packages-dist/animations/bundles/animations-browser.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/animations/browser'}, moduleName: 'ng.animations.browser', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/animations/browser/testing/rollup.config.js b/packages/animations/browser/testing/rollup.config.js index 22b3780a39..4b82a2c0f3 100644 --- a/packages/animations/browser/testing/rollup.config.js +++ b/packages/animations/browser/testing/rollup.config.js @@ -21,6 +21,7 @@ export default { dest: '../../../../dist/packages-dist/animations/bundles/animations-browser-testing.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/animations/browser/testing'}, moduleName: 'ng.animations.browser.testing', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/animations/rollup.config.js b/packages/animations/rollup.config.js index a488d514ce..30084d92a5 100644 --- a/packages/animations/rollup.config.js +++ b/packages/animations/rollup.config.js @@ -21,6 +21,7 @@ export default { dest: '../../dist/packages-dist/animations/bundles/animations.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/animations'}, moduleName: 'ng.animations', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/common/http/rollup.config.js b/packages/common/http/rollup.config.js index 4f26655bc1..439f9205f1 100644 --- a/packages/common/http/rollup.config.js +++ b/packages/common/http/rollup.config.js @@ -25,6 +25,7 @@ export default { dest: '../../../dist/packages-dist/common/bundles/common-http.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/common/http'}, moduleName: 'ng.common.http', external: Object.keys(globals), globals: globals diff --git a/packages/common/http/testing/rollup.config.js b/packages/common/http/testing/rollup.config.js index 4f5156eeb0..58fdb90e00 100644 --- a/packages/common/http/testing/rollup.config.js +++ b/packages/common/http/testing/rollup.config.js @@ -24,6 +24,7 @@ export default { dest: '../../../../dist/packages-dist/common/bundles/common-http-testing.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/common/http/testing'}, moduleName: 'ng.common.http.testing', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/common/rollup.config.js b/packages/common/rollup.config.js index 729fec2e19..3efc35ff03 100644 --- a/packages/common/rollup.config.js +++ b/packages/common/rollup.config.js @@ -21,6 +21,7 @@ export default { format: 'umd', exports: 'named', moduleName: 'ng.common', + amd: {id: '@angular/common'}, plugins: [resolve(), sourcemaps()], external: Object.keys(globals), globals: globals diff --git a/packages/common/testing/rollup.config.js b/packages/common/testing/rollup.config.js index e8c9832667..79b1d5f406 100644 --- a/packages/common/testing/rollup.config.js +++ b/packages/common/testing/rollup.config.js @@ -21,6 +21,7 @@ export default { dest: '../../../dist/packages-dist/common/bundles/common-testing.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/common/testing'}, moduleName: 'ng.common.testing', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/compiler-cli/browser-rollup.config.js b/packages/compiler-cli/browser-rollup.config.js index 5074ae9414..806a680211 100644 --- a/packages/compiler-cli/browser-rollup.config.js +++ b/packages/compiler-cli/browser-rollup.config.js @@ -53,6 +53,7 @@ export default { entry: '../../dist/packages-dist/compiler-cli/src/ngc.js', dest: './browser-bundle.umd.js', format: 'umd', + amd: {id: '@angular/compiler-cli-browser'}, moduleName: 'ng.compiler_cli_browser', exports: 'named', external: [ diff --git a/packages/compiler/rollup.config.js b/packages/compiler/rollup.config.js index e7490ccc44..11d72b7375 100644 --- a/packages/compiler/rollup.config.js +++ b/packages/compiler/rollup.config.js @@ -20,6 +20,7 @@ export default { dest: '../../dist/packages-dist/compiler/bundles/compiler.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/compiler'}, moduleName: 'ng.compiler', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/compiler/testing/rollup.config.js b/packages/compiler/testing/rollup.config.js index 0d2fb58191..ff2a352e64 100644 --- a/packages/compiler/testing/rollup.config.js +++ b/packages/compiler/testing/rollup.config.js @@ -22,6 +22,7 @@ export default { dest: '../../../dist/packages-dist/compiler/bundles/compiler-testing.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/compiler/testing'}, moduleName: 'ng.compiler.testing', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/core/rollup.config.js b/packages/core/rollup.config.js index 6038c3b22c..5059ccf024 100644 --- a/packages/core/rollup.config.js +++ b/packages/core/rollup.config.js @@ -23,6 +23,7 @@ export default { dest: '../../dist/packages-dist/core/bundles/core.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/core'}, moduleName: 'ng.core', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/core/testing/rollup.config.js b/packages/core/testing/rollup.config.js index b1974deadd..3fd8842649 100644 --- a/packages/core/testing/rollup.config.js +++ b/packages/core/testing/rollup.config.js @@ -20,6 +20,7 @@ export default { dest: '../../../dist/packages-dist/core/bundles/core-testing.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/core/testing'}, moduleName: 'ng.core.testing', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/forms/rollup.config.js b/packages/forms/rollup.config.js index a8a7c6adb2..202a74b604 100644 --- a/packages/forms/rollup.config.js +++ b/packages/forms/rollup.config.js @@ -26,6 +26,7 @@ export default { dest: '../../dist/packages-dist/forms/bundles/forms.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/forms'}, moduleName: 'ng.forms', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/http/rollup.config.js b/packages/http/rollup.config.js index 7b67d474b9..c7a1028a46 100644 --- a/packages/http/rollup.config.js +++ b/packages/http/rollup.config.js @@ -22,6 +22,7 @@ export default { dest: '../../dist/packages-dist/http/bundles/http.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/http'}, moduleName: 'ng.http', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/http/testing/rollup.config.js b/packages/http/testing/rollup.config.js index cc21db3b1a..729eba7520 100644 --- a/packages/http/testing/rollup.config.js +++ b/packages/http/testing/rollup.config.js @@ -25,6 +25,7 @@ export default { dest: '../../../dist/packages-dist/http/bundles/http-testing.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/http/testing'}, moduleName: 'ng.http.testing', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/language-service/rollup.config.js b/packages/language-service/rollup.config.js index 7822ec16b8..2ef68acb97 100644 --- a/packages/language-service/rollup.config.js +++ b/packages/language-service/rollup.config.js @@ -64,6 +64,12 @@ export default { entry: '../../dist/packages-dist/language-service/esm5/language-service.js', dest: '../../dist/packages-dist/language-service/bundles/language-service.umd.js', format: 'amd', + amd: { + // Don't name this module, causes + // Loading the language service caused the following exception: TypeError: + // $deferred.modules.map is not a function + // id: '@angular/language-service' + }, moduleName: 'ng.language_service', exports: 'named', external: [ diff --git a/packages/platform-browser-dynamic/rollup.config.js b/packages/platform-browser-dynamic/rollup.config.js index 7c1e9e6071..bff6cf8696 100644 --- a/packages/platform-browser-dynamic/rollup.config.js +++ b/packages/platform-browser-dynamic/rollup.config.js @@ -21,6 +21,7 @@ export default { dest: '../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/platform-browser-dynamic'}, moduleName: 'ng.platformBrowserDynamic', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/platform-browser-dynamic/testing/rollup.config.js b/packages/platform-browser-dynamic/testing/rollup.config.js index 2e5ad8eaa4..7d92bf1188 100644 --- a/packages/platform-browser-dynamic/testing/rollup.config.js +++ b/packages/platform-browser-dynamic/testing/rollup.config.js @@ -26,6 +26,7 @@ export default { '../../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/platform-browser-dynamic/testing'}, moduleName: 'ng.platformBrowserDynamic.testing', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/platform-browser/animations/rollup.config.js b/packages/platform-browser/animations/rollup.config.js index b5c4fc8397..6d888f264a 100644 --- a/packages/platform-browser/animations/rollup.config.js +++ b/packages/platform-browser/animations/rollup.config.js @@ -22,6 +22,7 @@ export default { dest: '../../../dist/packages-dist/platform-browser/bundles/platform-browser-animations.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/platform-browser/animations'}, moduleName: 'ng.platformBrowser.animations', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/platform-browser/rollup.config.js b/packages/platform-browser/rollup.config.js index a8b70b86b8..279f09e8df 100644 --- a/packages/platform-browser/rollup.config.js +++ b/packages/platform-browser/rollup.config.js @@ -19,6 +19,7 @@ export default { dest: '../../dist/packages-dist/platform-browser/bundles/platform-browser.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/platform-browser'}, moduleName: 'ng.platformBrowser', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/platform-browser/testing/rollup.config.js b/packages/platform-browser/testing/rollup.config.js index 9b91fdb51e..cdaef80fd7 100644 --- a/packages/platform-browser/testing/rollup.config.js +++ b/packages/platform-browser/testing/rollup.config.js @@ -20,6 +20,7 @@ export default { dest: '../../../dist/packages-dist/platform-browser/bundles/platform-browser-testing.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/platform-browser/testing'}, moduleName: 'ng.platformBrowser.testing', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/platform-server/rollup.config.js b/packages/platform-server/rollup.config.js index 147f071a5d..f1478920a2 100644 --- a/packages/platform-server/rollup.config.js +++ b/packages/platform-server/rollup.config.js @@ -26,6 +26,7 @@ export default { dest: '../../dist/packages-dist/platform-server/bundles/platform-server.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/platform-server'}, moduleName: 'ng.platformServer', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/platform-server/testing/rollup.config.js b/packages/platform-server/testing/rollup.config.js index 7e4b99b4df..c545d4ca73 100644 --- a/packages/platform-server/testing/rollup.config.js +++ b/packages/platform-server/testing/rollup.config.js @@ -24,6 +24,7 @@ export default { dest: '../../../dist/packages-dist/platform-server/bundles/platform-server-testing.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/platform-server/testing'}, moduleName: 'ng.platformServer.testing', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/platform-webworker-dynamic/rollup.config.js b/packages/platform-webworker-dynamic/rollup.config.js index d9f5d5e161..953a1e2fe5 100644 --- a/packages/platform-webworker-dynamic/rollup.config.js +++ b/packages/platform-webworker-dynamic/rollup.config.js @@ -24,6 +24,7 @@ export default { '../../dist/packages-dist/platform-webworker-dynamic/bundles/platform-webworker-dynamic.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/platform-webworker-dynamic'}, moduleName: 'ng.platformWebworkerDynamic', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/platform-webworker/rollup.config.js b/packages/platform-webworker/rollup.config.js index 780d937363..19d1a37e06 100644 --- a/packages/platform-webworker/rollup.config.js +++ b/packages/platform-webworker/rollup.config.js @@ -22,6 +22,7 @@ export default { dest: '../../dist/packages-dist/platform-webworker/bundles/platform-webworker.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/platform-webworker'}, moduleName: 'ng.platformWebworker', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/router/rollup.config.js b/packages/router/rollup.config.js index 58090e5f5e..cfb684d511 100644 --- a/packages/router/rollup.config.js +++ b/packages/router/rollup.config.js @@ -44,6 +44,7 @@ export default { dest: '../../dist/packages-dist/router/bundles/router.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/router'}, moduleName: 'ng.router', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/router/testing/rollup.config.js b/packages/router/testing/rollup.config.js index d3bdcbed4e..162561bb44 100644 --- a/packages/router/testing/rollup.config.js +++ b/packages/router/testing/rollup.config.js @@ -22,6 +22,7 @@ export default { dest: '../../../dist/packages-dist/router/bundles/router-testing.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/router/testing'}, moduleName: 'ng.router.testing', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/router/upgrade/rollup.config.js b/packages/router/upgrade/rollup.config.js index cf2db9cdcb..8a0efd0639 100644 --- a/packages/router/upgrade/rollup.config.js +++ b/packages/router/upgrade/rollup.config.js @@ -21,6 +21,7 @@ export default { dest: '../../../dist/packages-dist/router/bundles/router-upgrade.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/router/upgrade'}, moduleName: 'ng.router.upgrade', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/upgrade/rollup.config.js b/packages/upgrade/rollup.config.js index 3ae4d2ee10..bdbf83daa5 100644 --- a/packages/upgrade/rollup.config.js +++ b/packages/upgrade/rollup.config.js @@ -27,6 +27,7 @@ export default { dest: '../../dist/packages-dist/upgrade/bundles/upgrade.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/upgrade'}, moduleName: 'ng.upgrade', plugins: [resolve(), sourcemaps()], external: Object.keys(globals), diff --git a/packages/upgrade/static/rollup.config.js b/packages/upgrade/static/rollup.config.js index 7f697cf69f..58c8640c94 100644 --- a/packages/upgrade/static/rollup.config.js +++ b/packages/upgrade/static/rollup.config.js @@ -18,6 +18,7 @@ export default { dest: '../../../dist/packages-dist/upgrade/bundles/upgrade-static.umd.js', format: 'umd', exports: 'named', + amd: {id: '@angular/upgrade/static'}, moduleName: 'ng.upgrade.static', plugins: [resolve(), sourcemaps()], external: Object.keys(globals),