mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-28 17:35:42 +08:00
update reference with new name (#2259)
s/adding-images-and-fonts/adding-images-fonts-and-files/
This commit is contained in:
@@ -579,7 +579,7 @@ The `<script>` tag with the compiled code will be added to it automatically duri
|
||||
You can also add other assets to the `public` folder.
|
||||
|
||||
Note that we normally encourage you to `import` assets in JavaScript files instead.
|
||||
For example, see the sections on [adding a stylesheet](#adding-a-stylesheet) and [adding images and fonts](#adding-images-and-fonts).
|
||||
For example, see the sections on [adding a stylesheet](#adding-a-stylesheet) and [adding images and fonts](#adding-images-fonts-and-files).
|
||||
This mechanism provides a number of benefits:
|
||||
|
||||
* Scripts and stylesheets get minified and bundled together to avoid extra network requests.
|
||||
@@ -619,7 +619,7 @@ Keep in mind the downsides of this approach:
|
||||
|
||||
### When to Use the `public` Folder
|
||||
|
||||
Normally we recommend importing [stylesheets](#adding-a-stylesheet), [images, and fonts](#adding-images-and-fonts) from JavaScript.
|
||||
Normally we recommend importing [stylesheets](#adding-a-stylesheet), [images, and fonts](#adding-images-fonts-and-files) from JavaScript.
|
||||
The `public` folder is useful as a workaround for a number of less common cases:
|
||||
|
||||
* You need a file with a specific name in the build output, such as [`manifest.webmanifest`](https://developer.mozilla.org/en-US/docs/Web/Manifest).
|
||||
|
||||
Reference in New Issue
Block a user