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

Commit

Permalink
fix: Package Error stack rewriting as a separate bundle. (#770)
Browse files Browse the repository at this point in the history
* chore(example): disable most features for faster loading

* fix: Package Error stack rewriting as a separate bundle.
  • Loading branch information
mhevery authored May 3, 2017
1 parent b48db54 commit b5e33fd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
8 changes: 8 additions & 0 deletions example/profiling.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
<meta charset="utf-8">
<title>Zones Profiling</title>
<link rel="stylesheet" href="css/style.css">
<script>
__Zone_disable_Error = true;
__Zone_disable_on_property = true;
__Zone_disable_geolocation = true;
__Zone_disable_toString = true;
__Zone_disable_blocking = true;
__Zone_disable_PromiseRejectionEvent = true;
</script>
<script src="../dist/zone.js"></script>
<script src="../dist/long-stack-trace-zone.js"></script>
</head>
Expand Down
12 changes: 11 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ gulp.task('build/zone.min.js', ['compile-esm'], function(cb) {
return generateScript('./lib/browser/rollup-main.ts', 'zone.min.js', true, cb);
});

gulp.task('build/zone-error.js', ['compile-esm'], function(cb) {
return generateScript('./lib/common/error-rewrite.ts', 'zone-error.js', false, cb);
});

gulp.task('build/zone-error.min.js', ['compile-esm'], function(cb) {
return generateScript('./lib/common/error-rewrite.ts', 'zone-error.min.js', true, cb);
});

gulp.task('build/webapis-media-query.js', ['compile-esm'], function(cb) {
return generateScript('./lib/browser/webapis-media-query.ts', 'webapis-media-query.js', false, cb);
});
Expand Down Expand Up @@ -179,6 +187,8 @@ gulp.task('build', [
'build/zone.js',
'build/zone.js.d.ts',
'build/zone.min.js',
'build/zone-error.js',
'build/zone-error.min.js',
'build/zone-node.js',
'build/webapis-media-query.js',
'build/webapis-media-query.min.js',
Expand Down Expand Up @@ -293,4 +303,4 @@ gulp.task('promisetest', ['build/zone-node.js'], (cb) => {
cb(err);
}
});
});
});
1 change: 0 additions & 1 deletion lib/browser/rollup-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@

import '../zone';
import '../common/promise';
import '../common/error-rewrite';
import './browser';
1 change: 0 additions & 1 deletion lib/node/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import '../zone';
import '../common/promise';
import '../common/error-rewrite';
import '../common/to-string';
import './events';
import './fs';
Expand Down

0 comments on commit b5e33fd

Please sign in to comment.