Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Unified Diff: sdk/lib/_internal/pub/lib/src/command/serve.dart

Issue 82373002: Fix filtering out .dart files in release mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/lib/src/command/serve.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/serve.dart b/sdk/lib/_internal/pub/lib/src/command/serve.dart
index 11a2e2aaf804b44ce07341b9fad749960ec1518c..f6df4ce2fe875ac7821f58fbd8065b3c0286a705 100644
--- a/sdk/lib/_internal/pub/lib/src/command/serve.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/serve.dart
@@ -80,6 +80,12 @@ class ServeCommand extends PubCommand {
builtInTransformers: builtInTransformers,
watcher: watcherType);
}).then((server) {
+ // In release mode, strip out .dart files since all relevant ones have
+ // been compiled to JavaScript already.
+ if (mode == BarbackMode.RELEASE) {
+ server.allowAsset = (url) => !url.path.endsWith(".dart");
+ }
+
/// This completer is used to keep pub running (by not completing) and
/// to pipe fatal errors to pub's top-level error-handling machinery.
var completer = new Completer();

Powered by Google App Engine
This is Rietveld 408576698