Skip to content

Commit

Permalink
test: fix ivy ts_devserver tests under /packages/core/test/bunding/ (#…
Browse files Browse the repository at this point in the history
…32520)

PR Close #32520
  • Loading branch information
gregmagolan authored and matsko committed Sep 7, 2019
1 parent 33038f6 commit df5924a
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 48 deletions.
9 changes: 7 additions & 2 deletions packages/core/test/bundling/todo/BUILD.bazel
Expand Up @@ -89,8 +89,13 @@ genrule(

ts_devserver(
name = "devserver",
entry_module = "angular/packages/core/test/bundling/todo/index",
serving_path = "/bundle.min.js",
entry_module = "@angular/core/test/bundling/todo",
scripts = [
"//tools/rxjs:rxjs_umd_modules",
],
# Use a serving_path that matches the common static index.html used
# in both devserver & prodserver
serving_path = "/bundle.min.js.br",
static_files = [
"index.html",
":tslib",
Expand Down
14 changes: 0 additions & 14 deletions packages/core/test/bundling/todo/index.html
Expand Up @@ -38,20 +38,6 @@
(document.location.search.endsWith('debug') ? '/bundle.min_debug.js' : '/bundle.min.js.br') +
'"></' + 'script>');
</script>
<script>
if (typeof define === "function" && define.amd) {
// If `define` is defined that we are in devserver mode. Dev server concatenates all of the
// source files and than loads them using `require`. There is an issue with the way
// `@angular/core` imports are generated which results in both `@angular/core` as well as `@angular/core/index`
// This hack makes both of the exports available to the application.
define("@angular/core", ["require", "exports", "tslib", "@angular/core/index"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib = require("tslib");
tslib.__exportStar(require("@angular/core/index"), exports);
});
}
</script>
</body>

</html>
9 changes: 7 additions & 2 deletions packages/core/test/bundling/todo_i18n/BUILD.bazel
Expand Up @@ -83,8 +83,13 @@ genrule(

ts_devserver(
name = "devserver",
entry_module = "angular/packages/core/test/bundling/todo_i18n/index",
serving_path = "/bundle.min.js",
entry_module = "@angular/core/test/bundling/todo_i18n",
scripts = [
"//tools/rxjs:rxjs_umd_modules",
],
# Use a serving_path that matches the common static index.html used
# in both devserver & prodserver
serving_path = "/bundle.min.js.br",
static_files = [
"index.html",
":tslib",
Expand Down
14 changes: 0 additions & 14 deletions packages/core/test/bundling/todo_i18n/index.html
Expand Up @@ -38,20 +38,6 @@
(document.location.search.endsWith('debug') ? '/bundle.min_debug.js' : '/bundle.min.js.br') +
'"></' + 'script>');
</script>
<script>
if (typeof define === "function" && define.amd) {
// If `define` is defined that we are in devserver mode. Dev server concatenates all of the
// source files and than loads them using `require`. There is an issue with the way
// `@angular/core` imports are generated which results in both `@angular/core` as well as `@angular/core/index`
// This hack makes both of the exports available to the application.
define("@angular/core", ["require", "exports", "tslib", "@angular/core/index"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib = require("tslib");
tslib.__exportStar(require("@angular/core/index"), exports);
});
}
</script>
</body>

</html>
9 changes: 7 additions & 2 deletions packages/core/test/bundling/todo_r2/BUILD.bazel
Expand Up @@ -84,8 +84,13 @@ genrule(

ts_devserver(
name = "devserver",
entry_module = "angular/packages/core/test/bundling/todo_r2/index",
serving_path = "/bundle.min.js",
entry_module = "@angular/core/test/bundling/todo_r2",
scripts = [
"//tools/rxjs:rxjs_umd_modules",
],
# Use a serving_path that matches the common static index.html used
# in both devserver & prodserver
serving_path = "/bundle.min.js.br",
static_files = [
"index.html",
":tslib",
Expand Down
14 changes: 0 additions & 14 deletions packages/core/test/bundling/todo_r2/index.html
Expand Up @@ -38,20 +38,6 @@
(document.location.search.endsWith('debug') ? '/bundle.min_debug.js' : '/bundle.min.js.br') +
'"></' + 'script>');
</script>
<script>
if (typeof define === "function" && define.amd) {
// If `define` is defined that we are in devserver mode. Dev server concatenates all of the
// source files and than loads them using `require`. There is an issue with the way
// `@angular/core` imports are generated which results in both `@angular/core` as well as `@angular/core/index`
// This hack makes both of the exports available to the application.
define("@angular/core", ["require", "exports", "tslib", "@angular/core/index"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib = require("tslib");
tslib.__exportStar(require("@angular/core/index"), exports);
});
}
</script>
</body>

</html>
1 change: 1 addition & 0 deletions packages/core/test/bundling/util/BUILD.bazel
Expand Up @@ -12,6 +12,7 @@ ts_library(
":metadata_switch",
],
module_name = "@angular/core/test/bundling/util/src/reflect_metadata",
module_root = "src/reflect_metadata",
deps = ["@npm//reflect-metadata"],
)

Expand Down

0 comments on commit df5924a

Please sign in to comment.