Skip to content

Commit c0eacce

Browse files
authored
Support pure functional components
1 parent f2c8e11 commit c0eacce

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/process.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,12 @@ module.exports = function(src, filename, config) {
107107
)
108108

109109
const isFunctional =
110-
descriptor.template &&
110+
(descriptor.template &&
111111
descriptor.template.attrs &&
112-
descriptor.template.attrs.functional
112+
descriptor.template.attrs.functional) ||
113+
(descriptor.script &&
114+
descriptor.script.content &&
115+
/functional:\s*true/.test(descriptor.script.content))
113116

114117
const templateStart = descriptor.template && descriptor.template.start
115118
const templateLine = src.slice(0, templateStart).split(splitRE).length

0 commit comments

Comments
 (0)