Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
just-boris opened this issue Jun 18, 2018 · 3 comments
Closed

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

just-boris opened this issue Jun 18, 2018 · 3 comments
Labels

Comments

@just-boris
Copy link
Contributor

just-boris commented Jun 18, 2018

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

@iansu
Copy link
Contributor

iansu commented Jun 18, 2018

I'm not really familiar with that shorthand import and export syntax but I can see why it doesn't work with the named asset import plugin. I'll look into a fix.

@Timer
Copy link
Contributor

Timer commented Jun 18, 2018

FYI, I noticed this:

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

Make sure you save this package exact. Using a caret range will leave you with the wrong version after an upgrade command.

@stale
Copy link

stale bot commented Nov 2, 2018

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs.

@stale stale bot added the stale label Nov 2, 2018
@Timer Timer closed this as completed Nov 2, 2018
@lock lock bot locked and limited conversation to collaborators Jan 9, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants