Closed santthosh closed 10 years ago
Thanks for the bug report.
The issue was simply that it ended up matching too many dots (.
). Previously it was matching .min..js
. I've got a fix I'm going to push, but you can manually edit your util.js
with this, which is the correct fix:
url = url.replace(/(\.min)?(\..+)$/, '.min$2');
This eliminates the extra dot, while still checking for a required leading dot.
It turns out my test case was testing against an existing .min.js
, so it the .min
was showing up even though the test actually failed. Oops!
I'll push an updated version (along with an updated gulp-cdnizer
in a few minutes.
Fantastic! Thanks, looking forward to the fix
Patched version should be available on NPM!
Thanks again for helping to find this, it was rather sneaky!
We are trying to replace something like this
<script src="/bower_components/angular/angular.js"></script>
with
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js"></script>
but we keep getting
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.js"></script>