Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit b5e33fd

Browse files
authored
fix: Package Error stack rewriting as a separate bundle. (#770)
* chore(example): disable most features for faster loading * fix: Package Error stack rewriting as a separate bundle.
1 parent b48db54 commit b5e33fd

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

example/profiling.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
<meta charset="utf-8">
55
<title>Zones Profiling</title>
66
<link rel="stylesheet" href="css/style.css">
7+
<script>
8+
__Zone_disable_Error = true;
9+
__Zone_disable_on_property = true;
10+
__Zone_disable_geolocation = true;
11+
__Zone_disable_toString = true;
12+
__Zone_disable_blocking = true;
13+
__Zone_disable_PromiseRejectionEvent = true;
14+
</script>
715
<script src="../dist/zone.js"></script>
816
<script src="../dist/long-stack-trace-zone.js"></script>
917
</head>

gulpfile.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ gulp.task('build/zone.min.js', ['compile-esm'], function(cb) {
9191
return generateScript('./lib/browser/rollup-main.ts', 'zone.min.js', true, cb);
9292
});
9393

94+
gulp.task('build/zone-error.js', ['compile-esm'], function(cb) {
95+
return generateScript('./lib/common/error-rewrite.ts', 'zone-error.js', false, cb);
96+
});
97+
98+
gulp.task('build/zone-error.min.js', ['compile-esm'], function(cb) {
99+
return generateScript('./lib/common/error-rewrite.ts', 'zone-error.min.js', true, cb);
100+
});
101+
94102
gulp.task('build/webapis-media-query.js', ['compile-esm'], function(cb) {
95103
return generateScript('./lib/browser/webapis-media-query.ts', 'webapis-media-query.js', false, cb);
96104
});
@@ -179,6 +187,8 @@ gulp.task('build', [
179187
'build/zone.js',
180188
'build/zone.js.d.ts',
181189
'build/zone.min.js',
190+
'build/zone-error.js',
191+
'build/zone-error.min.js',
182192
'build/zone-node.js',
183193
'build/webapis-media-query.js',
184194
'build/webapis-media-query.min.js',
@@ -293,4 +303,4 @@ gulp.task('promisetest', ['build/zone-node.js'], (cb) => {
293303
cb(err);
294304
}
295305
});
296-
});
306+
});

lib/browser/rollup-main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99

1010
import '../zone';
1111
import '../common/promise';
12-
import '../common/error-rewrite';
1312
import './browser';

lib/node/node.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import '../zone';
1010
import '../common/promise';
11-
import '../common/error-rewrite';
1211
import '../common/to-string';
1312
import './events';
1413
import './fs';

0 commit comments

Comments
 (0)