simcha's avatar

ReactComponent in LaravelMix

Is it not working?

I'm trying to use it with SVG As in create-react-app

import {ReactComponent as Chevron} from "./svg/chevron.svg";
 ...

<Chevron/>
0 likes
4 replies
martinbean's avatar

@simcha And I did not understand your question.

You can’t expect help if you just go, “not working”. Tell us why it’s not working. What did you expect? What do you actually get?

simcha's avatar

@martinbean right!

on i use like above and I get warnings in the compiler And did not see anything on the screen

The errors that appear in each of the import attempts:

WARNING in ./resources/js/components/ui/Icons/index.js 10:0-58
export 'ReactComponent' (reexported as 'Close') was not found in './svg/close.svg' (possible exports: default)

Please or to participate in this conversation.