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

Commit ab38663

Browse files
committed
add functional component warning
1 parent 34ccdd5 commit ab38663

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: lib/compiler.js

+7
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ compiler.compile = function (content, filePath, cb) {
126126
// template
127127
var template = resolvedParts.template
128128
if (template) {
129+
if (process.env.NODE_ENV !== 'production') {
130+
output +=
131+
'if (__vue__options__.functional) {console.error("' +
132+
'[vueify] functional components are not supported and ' +
133+
'should be defined in plain js files using render functions.' +
134+
'")}\n'
135+
}
129136
output +=
130137
'__vue__options__.render = ' + template.render + '\n' +
131138
'__vue__options__.staticRenderFns = ' + template.staticRenderFns + '\n'

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"source-map": "^0.5.6",
3333
"through": "^2.3.6",
3434
"vue-hot-reload-api": "^2.0.1",
35-
"vue-template-compiler": "^2.0.0-alpha.3"
35+
"vue-template-compiler": "^2.0.0-alpha.8"
3636
},
3737
"devDependencies": {
3838
"babel-core": "^6.0.0",

0 commit comments

Comments
 (0)