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
{{ message }}
This repository was archived by the owner on Mar 17, 2021. It is now read-only.
[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)
26
+
By default the filename of the resulting file is the MD5 hash of the file's contents
27
+
with the original extension of the required resource.
6
28
7
29
```javascript
8
30
var url =require("file-loader!./file.png");
9
31
// => emits file.png as file in the output directory and returns the public url
10
32
// => returns i. e. "/public-path/0dcbbaa701328a3c262cfd45869e351f.png"
11
33
```
12
34
13
-
By default the filename of the resulting file is the MD5 hash of the file's contents
14
-
with the original extension of the required resource.
15
-
16
35
By default a file is emitted, however this can be disabled if required (e.g. for server
17
36
side packages).
18
37
@@ -22,7 +41,7 @@ var url = require("file-loader?emitFile=false!./file.png");
22
41
// => returns i. e. "/public-path/0dcbbaa701328a3c262cfd45869e351f.png"
23
42
```
24
43
25
-
## Filename templates
44
+
####Filename templates
26
45
27
46
You can configure a custom filename template for your file using the query parameter `name`. For instance, to copy a file from your `context` directory into the output directory retaining the full directory structure, you might use `?name=[path][name].[ext]`.
28
47
@@ -31,10 +50,10 @@ By default, the path and name you specify will output the file in that same dire
31
50
You can specify custom output and public paths by using the `outputPath` and `publicPath` query name parameters:
0 commit comments