dart2js: Clean HTML whitespaces at compilation | بلاگ

dart2js: Clean HTML whitespaces at compilation

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

I'm creating an element with the dart:html lib. I'd like the indentation to be pretty on the Dart side, but as a matter of keeping the generated js as compact as possible, I'd like the compiler to clean up the string removing unnecessary spaces.

elem = Element.html(
    '''
    
   ''';

This minified generated code looks like:

s=W.h9('        

Basically all whitespaces remain. Although I'm sure gzip handles those whitespaces quite efficiently, I was wondering if there is any kind of preprocessing step where I could plug a cleanup phase, or any other mean to do it.

asked 45 secs ago
maphe

...
نویسنده : استخدام کار بازدید : 0 تاريخ : چهارشنبه 14 شهريور 1397 ساعت: 5:06