From ee91202ca7b15ac02402d61a7458e7fa12f3f3e9 Mon Sep 17 00:00:00 2001
From: Dan Abramov <dan.abramov@gmail.com>
Date: Fri, 22 Jul 2016 11:06:23 +0100
Subject: [PATCH] Move favicon outside src

---
 README.md                      |   2 +-
 config/webpack.config.dev.js   |   3 ++-
 config/webpack.config.prod.js  |   3 ++-
 template/{src => }/favicon.ico | Bin
 4 files changed, 5 insertions(+), 3 deletions(-)
 rename template/{src => }/favicon.ico (100%)

diff --git a/README.md b/README.md
index bab0ae1e9..bccbd38e3 100644
--- a/README.md
+++ b/README.md
@@ -48,12 +48,12 @@ Inside that directory, it will generate the initial project structure and instal
 my-app/
   README.md
   index.html
+  favicon.ico
   node_modules/
   package.json
   src/
     App.css
     App.js
-    favicon.ico
     index.css
     index.js
     logo.svg
diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js
index 45533b35c..40aec9d87 100644
--- a/config/webpack.config.dev.js
+++ b/config/webpack.config.dev.js
@@ -23,6 +23,7 @@ if (process.argv[2] === '--debug-template') {
 var srcPath = path.resolve(__dirname, relativePath, 'src');
 var nodeModulesPath = path.join(__dirname, '..', 'node_modules');
 var indexHtmlPath = path.resolve(__dirname, relativePath, 'index.html');
+var faviconPath = path.resolve(__dirname, relativePath, 'favicon.ico');
 var buildPath = path.join(__dirname, isInNodeModules ? '../../..' : '..', 'build');
 
 module.exports = {
@@ -91,7 +92,7 @@ module.exports = {
     new HtmlWebpackPlugin({
       inject: true,
       template: indexHtmlPath,
-      favicon: path.join(srcPath, 'favicon.ico'),
+      favicon: faviconPath,
     }),
     new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"development"' }),
     // Note: only CSS is currently hot reloaded
diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js
index b16d1bb1a..e4b4ef1e3 100644
--- a/config/webpack.config.prod.js
+++ b/config/webpack.config.prod.js
@@ -24,6 +24,7 @@ if (process.argv[2] === '--debug-template') {
 var srcPath = path.resolve(__dirname, relativePath, 'src');
 var nodeModulesPath = path.join(__dirname, '..', 'node_modules');
 var indexHtmlPath = path.resolve(__dirname, relativePath, 'index.html');
+var faviconPath = path.resolve(__dirname, relativePath, 'favicon.ico');
 var buildPath = path.join(__dirname, isInNodeModules ? '../../..' : '..', 'build');
 
 module.exports = {
@@ -92,7 +93,7 @@ module.exports = {
     new HtmlWebpackPlugin({
       inject: true,
       template: indexHtmlPath,
-      favicon: path.join(srcPath, 'favicon.ico'),
+      favicon: faviconPath,
       minify: {
         removeComments: true,
         collapseWhitespace: true,
diff --git a/template/src/favicon.ico b/template/favicon.ico
similarity index 100%
rename from template/src/favicon.ico
rename to template/favicon.ico
-- 
GitLab