gulp-useref
gulp-useref copied to clipboard
Update index.js
Usefull fix for user parametrs
example
<!-- build:js /js/all.js?rev=1234 -->
Coverage increased (+0.01%) to 98.16% when pulling ad578bb693a13ded89529231137d2ae373d86500 on bonm:patch-1 into c13848700f7a1194e9484aa2c95aa710030f11f4 on jonkemp:master.
@bonm I want to make sure I fully understand. This change just removes the url parameters from the path before passing it on?
@jonkemp yes. file can't create with param at file system
...
<head>
<!-- build:js /js/all.js?rev=@@hash -->
<script type="text/javascript"
...
<!-- endbuild -->
</head>
gulp build
...
[13:54:23] Error: ENOENT: no such file or directory, open 'D:\project\newApp\ru\js\all_m.js?rev=@@hash'
at Error (native)
stream.js:74
throw er; // Unhandled stream error in pipe.
^
Could you add a test for this?
Also, why would you add a parameter like that to throw it away? I think most people use something like this plugin:
https://github.com/sindresorhus/gulp-rev
I use https://github.com/bustardcelly/gulp-rev-append
@jonkemp
Could you add a test for this?
Yes, i try