Vulcanize CSS Polymer

I'm trying to pack my Polymer web application as an application for Chrome Packaged, but I'm having some issues with the Content Security Policy (CSP). I vulcanize the application (with the --csp option) before packaging it, which works fine for the JavaScript part, but cannot extract CSS embedded in Polymer elements. Is there a way to either: 1) override the CSP for Polymer CSS, or 2) extract the CSS and put it in a separate file for all Polymer elements?

As far as I can tell, there is PR to solve this problem, but it has not been updated since August: https://github.com/Polymer/vulcanize/pull/33 .

+5
source share
1 answer

You can use gulp-cssmin to combine your css extracted from the built-in htmls using the vulcanization option --csp.

See the clean-css example on the Github page:

 type one.css two.css three.css | cleancss -o merged-and-minified.css 
0
source

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


All Articles