Commit ee91202c authored by Dan Abramov's avatar Dan Abramov
Browse files

Move favicon outside src

parent 3f340f36
No related merge requests found
Showing with 5 additions and 3 deletions
+5 -3
...@@ -48,12 +48,12 @@ Inside that directory, it will generate the initial project structure and instal ...@@ -48,12 +48,12 @@ Inside that directory, it will generate the initial project structure and instal
my-app/ my-app/
README.md README.md
index.html index.html
favicon.ico
node_modules/ node_modules/
package.json package.json
src/ src/
App.css App.css
App.js App.js
favicon.ico
index.css index.css
index.js index.js
logo.svg logo.svg
......
...@@ -23,6 +23,7 @@ if (process.argv[2] === '--debug-template') { ...@@ -23,6 +23,7 @@ if (process.argv[2] === '--debug-template') {
var srcPath = path.resolve(__dirname, relativePath, 'src'); var srcPath = path.resolve(__dirname, relativePath, 'src');
var nodeModulesPath = path.join(__dirname, '..', 'node_modules'); var nodeModulesPath = path.join(__dirname, '..', 'node_modules');
var indexHtmlPath = path.resolve(__dirname, relativePath, 'index.html'); var indexHtmlPath = path.resolve(__dirname, relativePath, 'index.html');
var faviconPath = path.resolve(__dirname, relativePath, 'favicon.ico');
var buildPath = path.join(__dirname, isInNodeModules ? '../../..' : '..', 'build'); var buildPath = path.join(__dirname, isInNodeModules ? '../../..' : '..', 'build');
module.exports = { module.exports = {
...@@ -91,7 +92,7 @@ module.exports = { ...@@ -91,7 +92,7 @@ module.exports = {
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
inject: true, inject: true,
template: indexHtmlPath, template: indexHtmlPath,
favicon: path.join(srcPath, 'favicon.ico'), favicon: faviconPath,
}), }),
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"development"' }), new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"development"' }),
// Note: only CSS is currently hot reloaded // Note: only CSS is currently hot reloaded
......
...@@ -24,6 +24,7 @@ if (process.argv[2] === '--debug-template') { ...@@ -24,6 +24,7 @@ if (process.argv[2] === '--debug-template') {
var srcPath = path.resolve(__dirname, relativePath, 'src'); var srcPath = path.resolve(__dirname, relativePath, 'src');
var nodeModulesPath = path.join(__dirname, '..', 'node_modules'); var nodeModulesPath = path.join(__dirname, '..', 'node_modules');
var indexHtmlPath = path.resolve(__dirname, relativePath, 'index.html'); var indexHtmlPath = path.resolve(__dirname, relativePath, 'index.html');
var faviconPath = path.resolve(__dirname, relativePath, 'favicon.ico');
var buildPath = path.join(__dirname, isInNodeModules ? '../../..' : '..', 'build'); var buildPath = path.join(__dirname, isInNodeModules ? '../../..' : '..', 'build');
module.exports = { module.exports = {
...@@ -92,7 +93,7 @@ module.exports = { ...@@ -92,7 +93,7 @@ module.exports = {
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
inject: true, inject: true,
template: indexHtmlPath, template: indexHtmlPath,
favicon: path.join(srcPath, 'favicon.ico'), favicon: faviconPath,
minify: { minify: {
removeComments: true, removeComments: true,
collapseWhitespace: true, collapseWhitespace: true,
......
File moved
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment