How should I configure grunt-usemin to work with relative path

前端 未结 9 1650
予麋鹿
予麋鹿 2021-01-30 23:13

I have a grunt project backed by a yeoman-generator that I\'ve built based on the generator-webapp, if it\'s of any help, you can find it on GitHub

The grunt project mak

9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-30 23:50

    I have seen many questions about this and no real answers. In my project I have mapped the "dist" folder to "/static" server side. So I don't need to figure the relative path in index.html.

    But still, the issue remains with usemin

    
    
    
    

    the usemin file will be written in dist/static/css/main.css

    and the the HTML will show the wrong (but expected) path

    
    

    The only workaround I have found is to not touch the usemin block, run grunt and update the path manually.

提交回复
热议问题