Closed mijikim closed 4 years ago
You just have to be more explicit in your file patterns. The default ones (such as those for the CDN values) are very loose, and will match pretty much anything.
It shouldn't be modifying any URL that is not matched.
Is there a way to achieve this by ignoring paths that matches certain patterns instead of relying on file patterns? If I have a file that has both absolute path like the one shown above and paths that I would like to be cdnized, then file patterns won't help me that much.
Right now there is no support for exclusions. I'm willing to look at a Pull Request, but I don't want to change the default behavior.
A little late to the party but made an attempt at solving this.
Thanks @thescientist13! It's published with a new feature flag, excludeAbsolute, under version 3.1.0
I'll probably bump the version on gulp-cdnizer
, too
Just tried it out in my project and working great!
Thanks @OverZealous for the help and of course making cdnizer
in the first place. 🏆
Hello, Is there a way for cdnizer to not modify absolute urls? When I run cdnizer on a file that has below url, it removes one of the forward slash.
input < link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" />
output < link rel="stylesheet" href="/code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" />
Thank you!