Skip to content

node presets: consider adding allowSyntheticDefaultImports: false? #251

Open
@domdomegg

Description

@domdomegg

My understanding of allowSyntheticDefaultImports is that it assumes you have an extra build step that converts imports of the form import React from "react"; to import * as React from "react"; (so you can write the former in place of the latter).

However, by default Node does not do this natively. This can cause runtime errors when importing packages that haven't reexported everything as a default.

Also see:

I'm not fully confident about this - would be keen for others to weigh in whether this assessment is accurate.

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