polymer vulcanize keep external links

131 Views Asked by At

I am using Polymer to build widget in my web app, since I need my web app works with Mozilla and IE I need vulcanize my widget/custom-tags in single file .html, then the polymer frameworks will be include in my file .html. That's fine if I have one single page, but since I need to use Polymer in different web pages that force me to download the framework Polymer more than once. There is a way to vulcanize the page and download Polymer just once? I mean without include the framework into the page but still using external link

thanks

michele

2

There are 2 best solutions below

0
Michele Dibenedetto On BEST ANSWER

Maybe I explain in bad way myself, My achievement is "download the framework Polymer just once" and not in any single web page of my website. the solution I have found is - open the file polymer.html - copy the javascript code - past in a new file ex. polymer.js - go to the web page which use polymer and change the tag in

So that my web pages will download the framework Polymer just once

1
Chad Killingsworth On

The option you are looking for is the --exclude flag:

vulcanize --exclude "path/to/target/subpath/" --exclude "path/to/target/subpath2/" target.html

It will do exactly what you are asking for.

https://github.com/polymer/vulcanize