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

lib/compiler.js

Lines changed: 7 additions & 0 deletions
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'

package.json

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy