Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 757 Bytes

static-files.md

File metadata and controls

14 lines (9 loc) · 757 Bytes

Static Files

We are using file-loader to handle static files, which mean you can directly import the file you need and it will give you the path of that file:

import foo from './assets/foo.png'
//=> /public-path/foo.8a3c262cfd45869e351f.png

But we also use raw-loader to handle .svg files, it would direcly give you the raw content of the SVG so that you can inline it to your component, since Inline SVG is Best SVG.


For something like favicon.ico, we use copy-webpack-plugin to copy everything inside ./static folder to the root of dist folder.