Skip to content

Commit 5bc1a8d

Browse files
committed
fix: fix exporting function expression
Fixes #3831
1 parent 2041c0a commit 5bc1a8d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/transform-script.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ module.exports = ({ script, template, id, style }) => {
3939
if (
4040
node.declaration &&
4141
(node.declaration.type === 'ArrowFunctionExpression' ||
42-
node.declaration.type === 'FunctionDeclaration')
42+
node.declaration.type === 'FunctionDeclaration' ||
43+
node.declaration.type === 'FunctionExpression')
4344
) {
4445
astExtend = transformToAst(
4546
astExtendFunction.replace(

0 commit comments

Comments
 (0)