Skip to content

Commit

Permalink
fix: fix exporting function expression
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Mar 2, 2021
1 parent 8cf9689 commit 50d744c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/transform-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ module.exports = ({ script, template, style, emitCss, id: fileName }) => {
if (
node.declaration &&
(node.declaration.type === 'ArrowFunctionExpression' ||
node.declaration.type === 'FunctionDeclaration')
node.declaration.type === 'FunctionDeclaration' ||
node.declaration.type === 'FunctionExpression')
) {
astExtend = transformToAst(
astExtendFunction.replace(
Expand Down

0 comments on commit 50d744c

Please sign in to comment.