You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/configurations/asset-url.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ For example, `url(image.png)` will be translated into `require('./image.png')`.
6
6
7
7
1.`file-loader` allows you to designate where to copy and place the asset file, and how to name it using version hashes. The best part though, is that you can use relative URLs based on the folder structure of your source files, and Webpack will auto-rewrite them into different URLs in the bundled files based on the configuration.
8
8
9
-
2.`url-loader` allows you to conditionally inline a file as base-64 data URL if they are smaller than a given threshold. This can reduce the amount of HTTP requests for trivial files. If the file is larger than the threshold, it automatically fallbacks to `file-loader`.
9
+
2.`url-loader` allows you to conditionally inline a file as base-64 data URL if they are smaller than a given threshold. This can reduce the amount of HTTP requests for trivial files. If the file is larger than the threshold, it automatically falls back to `file-loader`.
10
10
11
11
Here's an example Webpack config that handles `.png`, `jpg` and `.gif` files, and inlining any file smaller than 10kb as base64 data URL:
0 commit comments