Skip to content

Commit ee91202

Browse files
committed
Move favicon outside src
1 parent 3f340f3 commit ee91202

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ Inside that directory, it will generate the initial project structure and instal
4848
my-app/
4949
README.md
5050
index.html
51+
favicon.ico
5152
node_modules/
5253
package.json
5354
src/
5455
App.css
5556
App.js
56-
favicon.ico
5757
index.css
5858
index.js
5959
logo.svg

config/webpack.config.dev.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ if (process.argv[2] === '--debug-template') {
2323
var srcPath = path.resolve(__dirname, relativePath, 'src');
2424
var nodeModulesPath = path.join(__dirname, '..', 'node_modules');
2525
var indexHtmlPath = path.resolve(__dirname, relativePath, 'index.html');
26+
var faviconPath = path.resolve(__dirname, relativePath, 'favicon.ico');
2627
var buildPath = path.join(__dirname, isInNodeModules ? '../../..' : '..', 'build');
2728

2829
module.exports = {
@@ -91,7 +92,7 @@ module.exports = {
9192
new HtmlWebpackPlugin({
9293
inject: true,
9394
template: indexHtmlPath,
94-
favicon: path.join(srcPath, 'favicon.ico'),
95+
favicon: faviconPath,
9596
}),
9697
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"development"' }),
9798
// Note: only CSS is currently hot reloaded

config/webpack.config.prod.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ if (process.argv[2] === '--debug-template') {
2424
var srcPath = path.resolve(__dirname, relativePath, 'src');
2525
var nodeModulesPath = path.join(__dirname, '..', 'node_modules');
2626
var indexHtmlPath = path.resolve(__dirname, relativePath, 'index.html');
27+
var faviconPath = path.resolve(__dirname, relativePath, 'favicon.ico');
2728
var buildPath = path.join(__dirname, isInNodeModules ? '../../..' : '..', 'build');
2829

2930
module.exports = {
@@ -92,7 +93,7 @@ module.exports = {
9293
new HtmlWebpackPlugin({
9394
inject: true,
9495
template: indexHtmlPath,
95-
favicon: path.join(srcPath, 'favicon.ico'),
96+
favicon: faviconPath,
9697
minify: {
9798
removeComments: true,
9899
collapseWhitespace: true,
File renamed without changes.

0 commit comments

Comments
 (0)