Search code examples
google-chromedartsource-maps

Dart sourcemaps for packaged app


I'm having problem with getting source maps running when my app is packaged as a chrome app. (I cannot see any dart files in Chrome developer tools). Is this feature currently supported?

When running the page as is, not as packaged app, the source map works fine.

I managed to get this working for unpacked extension, by changing the sourcemapingURL in the generated js file to absolute path:

//@ sourceMappingURL=file:///ABSOLUTE_PATH.js.map

I wonder if this can be done for packaged application.


Solution

  • It works in SDK 0.7.1 the build is run via build.dart

    #!/usr/bin/env dart
    
    import 'dart:io';
    import 'package:polymer/component_build.dart';
    import 'package:polymer/deploy.dart' as deploy;
    
    void main() {
      build(new Options().arguments, ['web/FlashCards.html'])
        .then((_) => deploy.main());
    }