Skip to content

Commit d861ffa

Browse files
committed
Iteration5: move images to public assets (especially the SVG file)
because as the SVG is in the 'src/assets/images/' you will have to import it to be able to use it. And then you end up with the following error: ERROR in ./src/assets/images/master-card.svg Module build failed (from ./node_modules/@svgr/webpack/lib/index.js): SyntaxError: unknown file: Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can set `throwIfNamespace: false` to bypass this warning. 5 | ...props 6 | }, svgRef) { The solution is to modify the SVG file which is surely what we don't want to do in this lab: https://stackoverflow.com/questions/59820954/syntaxerror-unknown-namespace-tags-are-not-supported-by-default Once the images moved, we can easily use it like that: <img src='visa.png' /> <img src='master-card.svg' />
1 parent 4e0da44 commit d861ffa

File tree

2 files changed

+0
-0
lines changed

2 files changed

+0
-0
lines changed

0 commit comments

Comments
 (0)