Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ignore/remove option #1685

Closed
sepans opened this issue Sep 23, 2014 · 5 comments
Closed

Adding ignore/remove option #1685

sepans opened this issue Sep 23, 2014 · 5 comments
Assignees

Comments

@sepans
Copy link

sepans commented Sep 23, 2014

'excludes.imports' option excludes the imported files from being vulcanized but it leaves the <link rel="import href="..."> tag in the html file.
In order to implement some sort of component lazy loading (using Polymer.import) I wanted to exclude and remove all the tags (as well as other already loaded component dependencies) from the vulcanized file which is being lazy loaded. So having a 'remove.imports' option would be very useful to remove the <link rel="import> tag when the regex matches.

If you agree I can submit a pull request, otherwise any suggestion for better handling this problem would be appreciated.

Thanks

@sepans sepans changed the title Adding ignore option Adding ignore/remove option Sep 23, 2014
@robdodson
Copy link
Contributor

+100, I think I'm blocked on this :(
It seems like if you exclude something from vulcanize it should just remove everything. I can't think of a use case where I want to exclude something but still have the link tag in there

@sepans
Copy link
Author

sepans commented Nov 3, 2014

If I am not missing something Polymer/polymer-bundler#89 should fix this. Currently I am using a grunt-string-replace task as a workaround to remove the tags after vulcanization.

@dfreedm
Copy link
Member

dfreedm commented Nov 3, 2014

(ported comment from #89)
There's a possibility that the excluded import is generated on the server, or has content which vulcanize does not handle well. If that is important I can add a "strip-excludes" option to make it explicit to remove excluded imports. If not, then we can merge #89 after making the tests pass.

@dfreedm
Copy link
Member

dfreedm commented Nov 3, 2014

Actually, let's flip that. The default should strip the excludes, and a --no-strip-excludes flag will turn it off for the small percentage use case that may need it.

@ebidel
Copy link
Contributor

ebidel commented Nov 3, 2014

Please document! It's a breaking change.

On Mon, Nov 3, 2014 at 11:58 AM, Daniel Freedman notifications@github.com
wrote:

Actually, let's flip that. The default should strip the excludes, and a
--no-strip-excludes flag will turn it off for the small percentage use
case that may need it.


Reply to this email directly or view it on GitHub
https://github.com/Polymer/vulcanize/issues/66#issuecomment-61538329.

@aomarks aomarks transferred this issue from Polymer/polymer-bundler Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants