We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e6b2473 + 75d5145 commit 0dbb821Copy full SHA for 0dbb821
packages/react-scripts/template/README.md
@@ -638,15 +638,17 @@ declare module "*.gif";
638
declare module "*.jpg";
639
declare module "*.jpeg";
640
declare module "*.png";
641
+declare module "*.svg";
642
```
643
+(you'll have to restart the compiler in order the changes to take place)
644
645
In this case, we've added several image file extensions as valid module formats.
646
647
Now that the compiler is configured, here is an example of importing an image file:
648
649
```js
650
import React from 'react';
-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
652
653
console.log(logo); // /logo.84287d09.png
654
0 commit comments