diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 6f0338d7e..0f6a00180 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -638,7 +638,9 @@ declare module "*.gif"; declare module "*.jpg"; declare module "*.jpeg"; declare module "*.png"; +declare module "*.svg"; ``` +(you'll have to restart the compiler in order the changes to take place) In this case, we've added several image file extensions as valid module formats. @@ -646,7 +648,7 @@ Now that the compiler is configured, here is an example of importing an image fi ```js import React from 'react'; -import logo from './logo.png'; // Tell Webpack this JS file uses this image +import logo from './logo.svg'; // Tell Webpack this JS file uses this image console.log(logo); // /logo.84287d09.png pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy