Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Usemin not removing block statements

I'm using grunt to build a dist and for some reason usemin WON'T remove the build statements. I'm not getting any errors during the build and some statements get removed and others don't. The files get minified, but they don't get linked.

Example dist code:

<!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="utf-8" />
    <title></title>
    <!-- build:css styles/vendor.css -->
    <!-- bower:css -->
    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
    <!-- endbower -->
    <!-- endbuild -->

    <script src="scripts/2b96018a.cv.js"></script>
</head>
<body>

</body>
</html>

Original:

<html lang="en">
<head>
    <meta charset="utf-8" />
    <title></title>
    <!-- build:css styles/vendor.css -->
    <!-- bower:css -->
    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
    <!-- endbower -->
    <!-- endbuild -->

    <!-- build:js scripts/cv.js -->
    <script src="scripts/app.js"></script>
    <!-- endbuild -->
</head>
<body>

</body>
</html>
like image 814
zematdev Avatar asked Oct 20 '22 17:10

zematdev


1 Answers

I've got the exact same problem. I noticed that removing the bower/endbower statments made it work, but you loose the benefit of bower-install. I'm still working on it

like image 102
topheman Avatar answered Oct 27 '22 10:10

topheman