How make pub build to use source maps on dart polymer projects

依然范特西╮ 提交于 2019-12-06 10:17:21

问题


On a dart polymer project when I do a debug pub build like so:

pub build --mode debug

the build process does correctly produce unminified javascript with source maps for the dart code.

However, the generated html file still references the .dart bootstrap script.

I can always manually modify the html after the fact to use the .js file, but that's a pain.

How do I get pub build to automatically generate an html file that references the debug javascript?


回答1:


One solution is to add a js: true entry for the polymer transformer in the pubspec file.

E.g.

transformers:
- polymer:
    entry_points: web/polymer_example.html
    js: true


来源:https://stackoverflow.com/questions/25432500/how-make-pub-build-to-use-source-maps-on-dart-polymer-projects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!