Skip to content
This repository has been archived by the owner on Dec 26, 2018. It is now read-only.

Commit

Permalink
add functional component warning
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 28, 2016
1 parent 34ccdd5 commit ab38663
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ compiler.compile = function (content, filePath, cb) {
// template
var template = resolvedParts.template
if (template) {
if (process.env.NODE_ENV !== 'production') {
output +=
'if (__vue__options__.functional) {console.error("' +
'[vueify] functional components are not supported and ' +
'should be defined in plain js files using render functions.' +
'")}\n'
}
output +=
'__vue__options__.render = ' + template.render + '\n' +
'__vue__options__.staticRenderFns = ' + template.staticRenderFns + '\n'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"source-map": "^0.5.6",
"through": "^2.3.6",
"vue-hot-reload-api": "^2.0.1",
"vue-template-compiler": "^2.0.0-alpha.3"
"vue-template-compiler": "^2.0.0-alpha.8"
},
"devDependencies": {
"babel-core": "^6.0.0",
Expand Down

0 comments on commit ab38663

Please sign in to comment.