Skip to content

Commit 6fb5b70

Browse files
committed
add functional warning
1 parent bf0c84d commit 6fb5b70

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/loader.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,15 @@ module.exports = function (content) {
210210
' }\n' +
211211
'})()}\n'
212212
}
213+
// check functional
214+
if (!isProduction) {
215+
output +=
216+
'if (__vue_options__.functional) {console.error("' +
217+
'[vue-loader] ' + fileName + ': functional components are not ' +
218+
'supported and should be defined in plain js files using render ' +
219+
'functions.' +
220+
'")}\n'
221+
}
213222
// final export
214223
output += '\nmodule.exports = __vue_exports__ || __vue_options__\n'
215224
} else {

0 commit comments

Comments
 (0)