core-elements icon indicating copy to clipboard operation
core-elements copied to clipboard

Investigate minification of js/css/html during deployment

Open jakemac53 opened this issue 10 years ago • 5 comments

Mangling names would be hard due to the js-interop, but we should be able to save a lot of space by just removing comments and collapsing whitespace. We should do this for html/css/js

jakemac53 avatar Jan 09 '15 16:01 jakemac53

Whatever solution we use here should also be applied to https://github.com/dart-lang/paper-elements

jakemac53 avatar Jan 09 '15 16:01 jakemac53

Be nice if there is any way to apply tree shaking to the elements. Remove unused elements etc

Andersmholmgren avatar Jan 09 '15 17:01 Andersmholmgren

I agree, but we can't really do that until we have global transformers (see http://dartbug.com/17306). The application is the only thing that knows what it could delete, but it can't delete files in this package.

jakemac53 avatar Jan 09 '15 18:01 jakemac53

Shouldn't it be possible to just run vulcanize or some other JavaScript minification after pub build to achive this?

zoechi avatar Jan 14 '15 18:01 zoechi

Yes, but it would be nice if we could integrate that into the transformation process, eliminating any extra steps and standardizing how its done.

jakemac53 avatar Jan 14 '15 19:01 jakemac53