Not able to bundle favicon.ico into build folder

Hello,

My file structure is as follows:

build
dev
-app.js
-public
--favicon.ico
webpack.config.js

And my webpack config file has the following loader:

  {
    test: /\.ico$/,
    loader: "url-loader",
    query: { mimetype: "image/x-icon" }
  }

And my app.js has a require to that ico file:

  var icoFile = require("./public/favicon.ico");

However, after the project is built, there is no favicon.ico file in my public folder. So, how can I tell webpack to include my favicon.ico file inside my build folder?

Author: Fantashit

1 thought on “Not able to bundle favicon.ico into build folder

Comments are closed.