diff --git a/README.md b/README.md index bab0ae1e96f54c9aabdab2ff3b932c1e338e5fb5..bccbd38e333f73c262f250268b3e8398355c1372 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 45533b35c090b873b382fdd0d7e73d6b8be8ee6d..40aec9d8735d92287e6ebd9b3d74596aeb7e79f6 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 b16d1bb1a0c2d7a0df8ed3e7b388b87ac8352bc1..e4b4ef1e37dc978efd9ad4db0b06fca4052d55a5 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