Configure the dev server for exploded dart apps.
This maps the root directory under root of the dev server, alongside the
build directory.
This allows one to refer to exploded dart apps through urls like
https://core.mojoapps.io/examples/dart/my_app/main.dart .
R=qsr@chromium.org
Review URL: https://codereview.chromium.org/1272193003 .
diff --git a/mojoconfig b/mojoconfig
index 6290531..8be95fb 100644
--- a/mojoconfig
+++ b/mojoconfig
@@ -16,7 +16,15 @@
# a prefix, first location that contains the requested path will apply.
'mappings': [
('packages/', ['@{BUILD_DIR}/gen/dart-pkg/packages']),
- ('', ['@{BUILD_DIR}']),
+ ('', [
+ # We map two directiories, so that both exploded dart apps under
+ # checkout root and built apps in the build directory are available.
+ # For example, one could refer to the apps of either type using urls:
+ # - https://core.mojoapps.io/spinning_cube.mojo
+ # - https://core.mojoapps.io/examples/dart/device_info/main.dart
+ '@{BUILD_DIR}',
+ '.'
+ ]),
],
},
],