Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Commit 0dbb821

Browse files
authored
Merge pull request #268 from kaminskypavel/patch-2
fix(readme): use the prepacked logo.svg as an example in "Adding Imag…
2 parents e6b2473 + 75d5145 commit 0dbb821

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react-scripts/template/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -638,15 +638,17 @@ declare module "*.gif";
638638
declare module "*.jpg";
639639
declare module "*.jpeg";
640640
declare module "*.png";
641+
declare module "*.svg";
641642
```
643+
(you'll have to restart the compiler in order the changes to take place)
642644

643645
In this case, we've added several image file extensions as valid module formats.
644646

645647
Now that the compiler is configured, here is an example of importing an image file:
646648

647649
```js
648650
import React from 'react';
649-
import logo from './logo.png'; // Tell Webpack this JS file uses this image
651+
import logo from './logo.svg'; // Tell Webpack this JS file uses this image
650652

651653
console.log(logo); // /logo.84287d09.png
652654

0 commit comments

Comments
 (0)