0
votes

Polymer 2.0 provides option for minify html and css in polymer.json while building in Polymer CLI. https://www.polymer-project.org/2.0/toolbox/build-for-production

but Polymer 1.0 does not provide that option and there is no documentation for that.

How this can be solved?

1
Maybe this will help you. Uglify/minify Polymer web components using gulp: stackoverflow.com/questions/35213647/… Seems like you have to do quite some work. - Binh Bui

1 Answers

0
votes

Polymer CLI works for Polymer 1, 2, and 3. That is, it can also minify Polymer 1 projects (e.g., Polymer 1.x app template). Here's a minimal polymer.json configuration that minifies HTML, CSS, and JavaScript:

{
  "builds": [{
    "name": "my-build",
    "html": {
      "minify": true
    },
    "css": {
      "minify": true
    },
    "js": {
      "minify": true
    }
  }]
}