Skip to content

Give an error when a default import failed #434

Description

@snebjorn

Describe the feature

I noticed that if the imported file doesn't have a default export and I'm expecting a default export via

await jiti.import('filePath', { default: true });

then it doesn't throw or give an error response.

I'd like to be able to detect that there was no default export when it's expected.

Additional information

  • Would you be willing to help implement this feature?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions