How to make a pub for using source maps on projects with drift polymers

In a dart polymer project, when I do a debug pub build like this:

pub build --mode debug

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

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

I can always manually change the html after the fact of using the .js file, but this is a pain.

How do I get a pub assembly to automatically create an html file that references debug javascript?

+2
source share
1 answer

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

eg.

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

Source: https://habr.com/ru/post/1201650/


All Articles