Search code examples
dartdart-polymerdart-editor

Run as Javascript inlines polymer-element


My "Run as Javascript" works, but it inlines all custom elements. In the dart version the custom elements are in a separate file and since I eventually want to use these elements for integration purposes I think it would be much more cleaner to keep it like that.

Is there a way to tell pub build/"Run as Javascript" to keep the custom element definition(s) separate?


Solution

  • You can't reuse built Polymer elements anyway so that wouldn't make sense.

    You have to reuse the Dart code and build the resulting application to JS.

    In-lining makes sense because the browser gets the entire application in one (or fewer) request instead of multiple calls fore each element.