Skip to content

Commit 776af31

Browse files
committed
handle compile warnings
1 parent 7810af8 commit 776af31

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/template-compiler.js

+9
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,18 @@ module.exports = function (html) {
5858
options.transformToRequire
5959
)
6060
}
61+
6162
var compiled = compiler.compile(html, Object.assign({
6263
preserveWhitespace: options.preserveWhitespace
6364
}, defaultCompileOptions))
65+
66+
// tips
67+
if (compiled.tips && compiled.tips.length) {
68+
compiled.tips.forEach(tip => {
69+
this.emitWarning(tip)
70+
})
71+
}
72+
6473
var code
6574
if (compiled.errors && compiled.errors.length) {
6675
this.emitError(

0 commit comments

Comments
 (0)