Skip to content

Named asset import plugin doesn't work with export-as syntax #4640

Closed
@just-boris

Description

@just-boris

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

N/A

Environment

Environment:

  OS:  macOS High Sierra 10.13.5
  Node:  10.1.0
  Yarn:  1.3.2
  npm:  6.1.0
  Watchman:  4.9.0
  Xcode:  Not Found
  Android Studio:  Not Found

Packages: (wanted => installed)

  react: ^16.4.1 => 16.4.1
  react-dom: ^16.4.1 => 16.4.1
  react-scripts: ^2.0.0-next.3e165448 => 2.0.0-next.3e165448

Steps to Reproduce

I tried to use SVG assets import, that was implemented there: #3907

The following code doesn't work

export { ReactComponent as Logo }  from "./Logo.svg";

But if I will split this into separate import/export, it will work:

import { ReactComponent as Logo }  from "./ReactIcon.svg";

export { Logo };

Expected Behavior

SVG import will work in both cases

Actual Behavior

Re-export doesn't work

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions