Search code examples
polymerpolymer-2.xpolymer-cli

How can I configure Polymer-cli build to exclude some file-path from being minified?


I am using polymer-cli's build to build my polymer app. Some of our dependencies are closed-source js libraries, which are already minified. My polymer build configuration looks like:

"builds": [{
  "name": "unbundled",
  "addServiceWorker": false,
  "addPushManifest": false,
  "insertPrefetchLinks": false,
  "js": {"minify": true, "compile": true},
  "css": {"minify": true},
  "html": {"minify": true}
}, ... ]

However, when polymer minifies the external js library code, that code breaks. So I need some way to exclude that js-code from being minified.

Any idea?


Solution

  • I believe currently there is no way to do it. The solution around it is to do an extra step to copy/overwrite from the source, to the build directory after the build process is completed.

    Hope that helps!