Grunt task(s) to minify single HTML file with CSS and Javascript

前端 未结 2 1870
别那么骄傲
别那么骄傲 2021-01-03 01:20

I\'m doing a login page which I want to be as lightweight as possible for the quickest possible loading time. I have a single dependency (a configuration file) and everythin

2条回答
  •  忘掉有多难
    2021-01-03 01:32

    I think you're looking for grunt-Process HTML and its rather smashing include subtask.

    In your index.html file you can include... includes. :)

    
    This will be replaced by the content of my-styles.min.css
    
    

    If that doesn't work for you, a simple bash script that concats the minified versions could also be run with Grunt-Run.

提交回复
热议问题