-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add favicon #70
Add favicon #70
Conversation
👍 |
@@ -91,6 +91,7 @@ module.exports = { | |||
new HtmlWebpackPlugin({ | |||
inject: true, | |||
template: indexHtmlPath, | |||
favicon: path.join(srcPath, 'favicon.ico'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work if it's in the root folder with HTML instead? This feels more like meta information than app module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it would be better to have a folder that contains static assets (favicon.ico
and logo.svg
)? I think favicon.ico
should be in that folder (let's call it assets
?) but not sure about logo.svg
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yeah, it works when it's not in the src
folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For logo.svg
and similar images, since it gets imported from javascript, it's annoying to put it in a different root folder. You would end up with import '../../../../../../../../assets/foo/bar/baz/qux.png'
in big projects rather than import './blah.png'
. The favicon is different since webpack handles it without js doing anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. I moved favicon.ico
to top level since it’s a “magic” file like index.html
.
The modules live in src
.
Implements #69. The favicon file is taken from https://facebook.github.io/react/.