Gulp not compile bower components in nunjucks file

43 views Asked by At

I have some troubleshot with bower_components. Gulp doesn't compile bower components during build process from Nunjucks file.

It is working normally during serve process but build

Here is my gulp file:

 gulp.src('app/layouts/*.njk')
.pipe(wiredep({
    exclude: ['bootstrap-sass'],
 ignorePath: /^(\.\.\/)*\.\./,
   fileTypes: {
     njk: {
       block: /(([ \t]*)<!--\s*bower:*(\S*)\s*-->)(\n|\r|.)*?(<!--\s*endbower\s*-->)/gi,
       detect: {
         js: /<script.*src=['"]([^'"]+)/gi,
         css: /<link.*href=['"]([^'"]+)/gi
       },
       replace: {
         js: '<script src="{{filePath}}"></script>',
         css: '<link rel="stylesheet" href="{{filePath}}" />'
       }
     }
   }
 }))
0

There are 0 answers