Skip to content

Default exports don't work #177

@dominictobias

Description

@dominictobias

Hi,

When exporting a default from a local module e.g.

exports = function blah() {}

And then importing it in index.js:

const blah = require('./blah');

Gives a Type error 'blah' is not a function in the firebase logs when trying to use it in a hook. Changing the export to exports.blah = function.. and importing that as a non-default function works. This was a pretty perplexing issue as I'd have expected exports to work in the same way as they always do in a Node project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions