My index.html page looks like this:
<html>
<script src="js/file1.js"></script>
<script src="js/file2.js"></script>
<script src="js/file2.js"></script>
</html>
Using grunt
i was able to concat and minify the js files into one file at prod/js/file.min.js
. I also have a new index.html
page at prod/index.html
that is minify.
The problem now is that this new index.html
page still reference the old three javascript files and not the new single javascript file. How would I go about changing this in grunt?
final html file should be:
<html>
<script src="js/file.min.js"></script>
</html>
You can use grunt-processhtml plugin to replace it
https://www.npmjs.com/package/grunt-processhtml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With