From a8418827249eaed56fe6bb4bc0fb9dffa2a09656 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Fri, 12 Jul 2019 13:12:31 -0700 Subject: [PATCH] Don't compile to JS in minified mode The JS size doesn't really matter on the server side, and this makes profiling the release-mode binary substantially easier, as well as improving the quality of stack traces provided by downstream users. --- tool/grind/npm.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tool/grind/npm.dart b/tool/grind/npm.dart index 1b77d9cc..8ab71e44 100644 --- a/tool/grind/npm.dart +++ b/tool/grind/npm.dart @@ -40,7 +40,10 @@ void _js({@required bool release}) { // * We expect our test coverage to ensure that nothing throws subtypes of // Error. // * We thoroughly test edge cases in user input. - if (release) ...["-O4", "--fast-startup"] + // + // We don't minify because download size isn't especially important + // server-side and it's nice to get readable stack traces from bug reports. + if (release) ...["-O4", "--no-minify", "--fast-startup"] ]); var text = destination .readAsStringSync()