Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

Optionally remove whitespace during vulcanization of css #1842

Closed samccone closed 5 years ago

samccone commented 8 years ago

As the vulcanize process inlines the JS and CSS for elements, the resulting elements.vulcanized.html contains several hundred KB of empty space. By using gulp-minify-inline on the vulcanized file, the size goes from 447K down to around 267K for the default install. Even with gzipped calls, this can be quite a bit of pageload reduced.

ref: https://github.com/PolymerElements/polymer-starter-kit/pull/486#issue-115633232 https://github.com/PolymerElements/polymer-starter-kit/issues/564 https://github.com/PolymerElements/polymer-starter-kit/pull/565

ebidel commented 8 years ago

I think the idea was to remove this kind of feature from vulcanize and have other tools like Polyclean that do the minification In the past, we've ran into many issues with css/html minifiers mucking output.

garlicnation commented 8 years ago

@ebidel is correct. This might be a feature we'd consider including in Polytool, however.

samccone commented 8 years ago

I have reopend over in polytool land as to not loose track of this valid issue that users are asking for :)