Answer the question
In order to leave comments, you need to log in
gulp-inject not working in pug/jade?
Actually, in .html templates it works fine, but with pug it refuses.
pug comments:
//- build:css
//- vendor:css
//- endinject
//- inject:css
//- endinject
//- endbuild
// html task options
html: {
// build:html:inject options
injectCss: {
options: {
relative: true,
name: 'build',
starttag: '//- build:css',
endtag: '//- endbuild',
removeTags: true
}
},
injectJs: {
options: {
relative: true,
name: 'build',
starttag: '//- build:js',
endtag: '//- endbuild',
removeTags: true
}
}
},
// pug task options
pug: {
// inject task options
injectCss: {
vendorOptions: {
relative: true,
name: 'vendor',
starttag: '//- vendor:css',
endtag: '//- endinject',
},
mainOptions: {
relative: true,
}
},
injectJs: {
options: {
relative: true,
starttag: '//- inject:js',
endtag: '//- endinject',
}
}
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question