Luismahou / grunt-hashres

Hashes your js and css files and rename the <script> and <link> declarations that refer to them in your html/php/etc files.
MIT License
115 stars 41 forks source link

Fix file reference with url parameters dropping ?= #52

Open dherbst opened 9 years ago

dherbst commented 9 years ago

If you have in your html file something like

<script src="myfile.js?v=4.2.0">

hashres ends up chopping off the ?= from the replaced file

<script src="myfile.82828ef.js=4.2.0">

which is not a valid url. The problem seems to be in the capture after the url, which is not used in the replace.