Closed tastepwalle closed 9 years ago
I have a similar issue, which is worse.
While using RequireJS, we have
<script data-main="js/config" src="js/vendor/require.js"></script>
where the file name in the data-main tag doesn't have a extension. But the text replace regex is expecting an extension:
replacementWithoutExtension + "((\-?)(.+)*)" + replacementExtension
which eats everything following. So the result we have is
<script data-main="js/config-HASH
which is completely a syntax error. It doesn't solve the problem if I put the src tag before data-main, as it even eats up the closing quote and the closing tag. Please fix it.
I know something is going wrong here after a pull request was merged some time ago. This doesn't have my priority to fix right now, but feel free to propose a pull request that fixes this issue and I'll be happy to merge :-)
I think this issue is fixed since now the data-main attribute is correctly replaced. You can close it.
Resolved in pull request #14
Awesome, thanks Paul!
Great task^^
I had a minor scuffle with the template replace regex. I am using RequireJS standard script tag:
When I ran grunt-cache-busting with the following params:
The regex ate my requirejs
src
attr and gave me:The fix is simple: put
src
beforedata-main
. Maybe by design but, it should probably be noted somewhere if so.I wish I could be more helpful and provide a fixed fork but I am swamped right now ㅜㅠ