-
Notifications
You must be signed in to change notification settings - Fork 2.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
How to add favicon to /dist? #128
Comments
Great question. Follow the same pattern used by tools/buildHTML. Just copy the file from the root of /src to the root of /dist |
Ah, multiple ways to do that, but here's an easy way with Node: http://stackoverflow.com/questions/11293857/fastest-way-to-copy-file-in-node-js |
Hmm that is one way. Here's how I did it in case anyone lands on this thread:
Now |
Nice! That solution is clearly better than my idea. :) I just tried adding this to Slingshot, but I'm getting an error. Would you be willing to submit a pull request? The only change I'd suggest from your snippet is to write a specific test for only the .ico file so that other filetypes can continue to be handled separately. |
Sure --> #129 😄 . Added specific test as you mentioned: https://github.com/coryhouse/react-slingshot/pull/129/files#diff-b83f3305d04bb1c8d674be30b5f9e1efR32 Tested and works well. |
If anyone is having trouble now I followed as per @jforaker but changed slightly for ejs and es6 import. Add your favicon.ico to wherever, in my case in In index.js In webpack.config.*.js files
and |
I only needed this: In webpack.config.*.js files
|
@ryangpts thanks, this is what I needed as well... |
@ryangpts legend!!! |
my favicon is in png format. it makes sense that it would work, but it's not |
png should be supported. Please see https://www.w3.org/2005/10/howto-favicon @StamatisDeli. |
@nickytonline I had to do this in plugins: |
It does work in png! |
Works for me
|
You still do it manually this works perfectly for me |
If u are using the hash to name the file, and using the In index.js In webpack.config.*.js files
|
Seems trivial but is difficult. How to add a
favicon.ico
to thenpm run build
task?The text was updated successfully, but these errors were encountered: